Fix the svace issue 52/103252/2
authorDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 8 Dec 2016 00:06:29 +0000 (09:06 +0900)
committerPyun DoHyun <dh79.pyun@samsung.com>
Thu, 8 Dec 2016 00:24:41 +0000 (16:24 -0800)
Change-Id: I71eba60a399d3892da3490ae20c944fce5636f22
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
src/bluetooth-common.c

index 050a9474486dd64a82da55d9e6e79b7ddd0a8a9d..764187b7123d0c433d558cb2157c02b64d0c8dae 100644 (file)
@@ -2214,10 +2214,7 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us
                                for (char_list = svc->characteristics; char_list; char_list = g_slist_next(char_list)) {
                                        bt_gatt_characteristic_s *chr = (bt_gatt_characteristic_s *)char_list->data;
 
-                                       if (chr == NULL)
-                                               continue;
-
-                                       if (chr->path && strcmp(char_val->char_handle, chr->path) == 0) {
+                                       if (chr && g_strcmp0(char_val->char_handle, chr->path) == 0) {
                                                g_free(chr->value);
                                                chr->value = NULL;
                                                if (char_val->val_len > 0)