Fix coverity issue 59/271559/1
authorWootak Jung <wootak.jung@samsung.com>
Wed, 23 Feb 2022 05:19:06 +0000 (14:19 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Wed, 23 Feb 2022 05:19:06 +0000 (14:19 +0900)
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

index 91d6378..12ce328 100644 (file)
@@ -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)