From 78d91b8c0c9b2d1b097a9060a62d28969d27dc47 Mon Sep 17 00:00:00 2001 From: Wootak Jung Date: Wed, 23 Feb 2022 14:19:06 +0900 Subject: [PATCH] Fix coverity issue dead_error_condition: The condition op must be true. CID 1263496 (#1 of 1): Logically dead code (DEADCODE) Change-Id: I8f62cb261535f20b2f7cb028c57505f9d7a66a3c --- src/gatt-database.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/gatt-database.c b/src/gatt-database.c index 91d6378..12ce328 100644 --- a/src/gatt-database.c +++ b/src/gatt-database.c @@ -3227,16 +3227,9 @@ static uint8_t ccc_write_cb(struct pending_op *op, void *user_data) * value for now. */ #ifdef TIZEN_FEATURE_BLUEZ_MODIFY - if (op) { - if (g_dbus_proxy_method_call(chrc->proxy, "StartNotify", - start_notify_setup, NULL, op, NULL) == FALSE) - return BT_ATT_ERROR_UNLIKELY; - } - else { - if (g_dbus_proxy_method_call(chrc->proxy, "StartNotify", NULL, - NULL, NULL, NULL) == FALSE) - return BT_ATT_ERROR_UNLIKELY; - } + if (g_dbus_proxy_method_call(chrc->proxy, "StartNotify", + start_notify_setup, NULL, op, NULL) == FALSE) + return BT_ATT_ERROR_UNLIKELY; #else if (g_dbus_proxy_method_call(chrc->proxy, "StartNotify", NULL, NULL, NULL, NULL) == FALSE) -- 2.7.4