Fix build error for toolchain upgrade 91/294891/2 accepted/tizen_9.0_unified accepted/tizen_unified accepted/tizen_unified_dev tizen tizen_9.0 accepted/tizen/9.0/unified/20241030.231735 accepted/tizen/unified/20240620.050753 accepted/tizen/unified/dev/20230726.115502 accepted/tizen/unified/dev/20240701.072815 tizen_9.0_m2_release
authorJihoon Jung <jh8801.jung@samsung.com>
Wed, 28 Jun 2023 07:48:25 +0000 (16:48 +0900)
committerJihoon Jung <jh8801.jung@samsung.com>
Wed, 28 Jun 2023 08:04:44 +0000 (17:04 +0900)
Change-Id: Ia07ee3b284376d6fe5eff509f73ab1f4ce1001d2
Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com>
src/zbl-dbus.c
test/main.c

index 036d252..8eab712 100644 (file)
@@ -6608,11 +6608,15 @@ int zbl_write_config_report(zb_zigbee_h handle, zb_nwk_addr addr16,
                DBG("change length = %d", len);
                DBG("payload length = %d", payload_len);
 
-               for (j = 0; j < len && (*records)[i].change+j; j++) {
+               if ((*records)[i].change == NULL) {
+                       ERR("record[%d].change is NULL", i);
+                       continue;
+               }
+
+               for (j = 0; j < len; j++) {
                        DBG("records[%d]->change[%d] = %d", i, j, (*records)[i].change[j]);
                        g_variant_builder_add(rec_builder, "(y)", (*records)[i].change[j]);
                }
-
        }
        rec_variant = g_variant_builder_end(rec_builder);
        g_variant_builder_unref(rec_builder);
index 5eac0cd..1f71465 100644 (file)
@@ -1304,15 +1304,15 @@ static int __select_handle_register_event(MManager *mm, struct menu_data *menu)
                        handle,
                        co_addr64
                        );
-       if (ZIGBEE_ERROR_NONE != ret)
+       if (ZIGBEE_ERROR_NONE != ret) {
                msg("zb_get_controller_mac_address(%d) - FAILED!!! [%s]",
                        ret, zigbee_error_to_string(ret));
-       else
+       } else {
                msg("   Coordinator Address:");
                msg("     %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X",
                        co_addr64[0], co_addr64[1], co_addr64[2], co_addr64[3],
                        co_addr64[4], co_addr64[5], co_addr64[6], co_addr64[7]);
-
+       }
        menu_manager_set_user_data(mm, handle);
 
        return RET_SUCCESS;