Fix svace issue (DEREF_OF_NULL) 66/313966/1 accepted/tizen/7.0/unified/20240705.165240
authorWootak Jung <wootak.jung@samsung.com>
Wed, 3 Jul 2024 02:09:44 +0000 (11:09 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Wed, 3 Jul 2024 02:11:04 +0000 (11:11 +0900)
Change #if to #ifdef

Change-Id: I5e684de618a46c178a23287e1f88031918d39308
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
src/device.c
src/gatt-client.c

index 8952f71fad96d8aee9767b0dda8fef5931e775f2..70d96d842b21d88a08e09197645a1cb991f444ef 100644 (file)
@@ -8165,7 +8165,7 @@ static void update_bredr_services(struct browse_req *req, sdp_list_t *recs)
        ba2str(btd_adapter_get_address(device->adapter), srcaddr);
        ba2str(&device->bdaddr, dstaddr);
 
-#if TIZEN_FEATURE_BLUEZ_MODIFY
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
        if (TIZEN_FEATURE_BLUEZ_DA)
                snprintf(sdp_file, PATH_MAX, TIZEN_FEATURE_BLUEZ_DA_CACHE_DIR "/%s/cache/%s", srcaddr,
                                dstaddr);
index d2d6825baf122ab1e7341ca698b3dd86def587a2..fd9ba03d975a2608dbabb8dec8b0c395bac64be6 100644 (file)
@@ -1448,7 +1448,7 @@ static void notify_client_free(struct notify_client *client)
                                                        client->notify_id);
 
 #ifdef TIZEN_FEATURE_BLUEZ_MODIFY
-       if (client->chrc->notify_io->data == client)
+       if (client->chrc->notify_io && client->chrc->notify_io->data == client)
                client->chrc->notify_io->data = NULL;
 #endif
        free(client->owner);