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);
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;