Fix warnings and erros generated by Tizen coding rule checker
authorsaerome kim <saerome.kim@samsung.com>
Wed, 8 Feb 2017 10:51:24 +0000 (19:51 +0900)
committersaerome.kim <saerome.kim@samsung.com>
Thu, 11 May 2017 09:07:20 +0000 (18:07 +0900)
Change-Id: I4df88dc7dacb16cdfa914915d8b6431fc947c487
Signed-off-by: saerome kim <saerome.kim@samsung.com>
18 files changed:
common/zb-common.h
common/zb-log.h
include/zb-error.h
include/zcl/zb-zcl-attribute-type.h
include/zcl/zb-zcl-cluster-ids.h
include/zcl/zb-zcl-commands.h
include/zcl/zb-zcl-door-lock-cluster.h
include/zcl/zb-zcl-groups-cluster.h
include/zcl/zb-zcl-ias-zone-cluster.h
include/zdo/zb-zdo-config.h
include/zdo/zb-zdo-dev-disc.h
include/zdo/zb-zdo-type.h
lib/zbl-dbus.c
lib/zbl-zcl-groups.c
test/custom.c
test/main.c
test/menu.h
test/test-zigbee.c

index 6c342b6..dc5e5a2 100644 (file)
@@ -314,14 +314,14 @@ struct read_attribute_status_record_s {
        unsigned char status; /**< status */
        unsigned char type; /**< data type */
        unsigned char *value; /**< data value \n
-                        unsigned int 1~8-byte \n
-                                        signed int : 1~8-byte \n
-                                        enumeration : 1~2-byte \n
-                                        floating point : 2~4-byte \n
-                                        string : from char to MBS \n
-                                        time : 4-byte \n
-                                        identifier : 2~4-byte \n
-                                        miscellaneous : 8~16 byte \n */
+                                       unsigned int 1~8-byte \n
+                                       signed int : 1~8-byte \n
+                                       enumeration : 1~2-byte \n
+                                       floating point : 2~4-byte \n
+                                       string : from char to MBS \n
+                                       time : 4-byte \n
+                                       identifier : 2~4-byte \n
+                                       miscellaneous : 8~16 byte \n */
 };
 
 /**
index fc7bbbb..e3e1303 100644 (file)
@@ -92,8 +92,8 @@
                if (expr) { \
                        ERR("(%s)", #expr); \
                        return; \
-               }\
-       } while(0)
+               } \
+       } while (0)
 
 #define RETV_IF(expr, val) \
        do {\
                        ERR("(%s)", #expr); \
                        return (val); \
                } \
-       } while(0)
+       } while (0)
 
 #define RETM_IF(expr, fmt, arg...) \
        do {\
                if (expr) { \
                        ERR(fmt, ##arg); \
                        return; \
-               }\
-       } while(0)
+               } \
+       } while (0)
 
 #define RETVM_IF(expr, val, fmt, arg...) \
        do {\
                        ERR(fmt, ##arg); \
                        return (val); \
                } \
-       } while(0)
+       } while (0)
 
 #define ERR_IF(expr) \
        do { \
index 7f4f12f..5b8a25a 100644 (file)
@@ -34,8 +34,7 @@
  *
  * @{
  */
-typedef enum
-{
+typedef enum {
        ZIGBEE_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
        ZIGBEE_ERROR_INVALID_PARAMETER = TIZEN_ERROR_ZIGBEE | 0x01, /**< parameter error */
        ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE = TIZEN_ERROR_ZIGBEE | 0x03, /**< out of range error */
index b9c258f..4e2d87c 100644 (file)
@@ -76,8 +76,8 @@ typedef enum {
        ZB_ZCL_64_BIT_BITMAP = 0x1f, /**< 64-bit bitmap, 8-byte */
        ZB_ZCL_UNSIGNED_8_BIT_INTEGER = 0x20, /**< unsigned 8-bit integer, 1-byte */
        ZB_ZCL_UNSIGNED_16_BIT_INTEGER = 0x21, /**< unsigned 16-bit integer, 2-byte */
-       ZB_ZCL_UNSIGNED_24_BIT_INTEGER = 0x22, /**< unsigned 24-bit integer, 3-byte */
-       ZB_ZCL_UNSIGNED_32_BIT_INTEGER = 0x23, /**< unsigned 32-bit integer, 4-byte */
+       ZB_ZCL_UNSIGNED_24_BIT_INTEGER = 0x22, /**< unsigned 24-bit integer, 3-byte */
+       ZB_ZCL_UNSIGNED_32_BIT_INTEGER = 0x23, /**< unsigned 32-bit integer, 4-byte */
        ZB_ZCL_UNSIGNED_40_BIT_INTEGER = 0x24, /**< unsigned 40-bit integer, 5-byte */
        ZB_ZCL_UNSIGNED_48_BIT_INTEGER = 0x25, /**< unsigned 48-bit integer, 6-byte */
        ZB_ZCL_UNSIGNED_56_BIT_INTEGER = 0x26, /**< unsigned 56-bit integer, 7-byte */
index 346b248..4bdc43a 100644 (file)
@@ -70,7 +70,7 @@ typedef enum {
        ZB_ZCL_LEVEL_CONTROL_CLUSTER_ID = 0x0008, /**< Level Control Cluster */
        ZB_ZCL_ALARM_CLUSTER_ID = 0x0009, /**< Alarm Cluster */
        ZB_ZCL_TIME_CLUSTER_ID = 0x000A, /**< Time Cluster */
-       ZB_ZCL_RSSI_LOCATION_CLUSTER_ID= 0x000B, /**< RSSI Location Cluster */
+       ZB_ZCL_RSSI_LOCATION_CLUSTER_ID = 0x000B, /**< RSSI Location Cluster */
        ZB_ZCL_BINARY_INPUT_BASIC_CLUSTER_ID = 0x000F, /**< Binary Input Basic Cluster */
        ZB_ZCL_COMMISSIONING_CLUSTER_ID = 0x0015, /**< Commissioning Cluster */
        ZB_ZCL_PARTITION_CLUSTER_ID = 0x0016, /**< Partition Cluster */
index ebce6ce..edfec8f 100644 (file)
@@ -209,7 +209,7 @@ typedef enum {
  *
  * @since_tizen 3.0
  */
- typedef enum {
+typedef enum {
        ZB_ZCL_ALARM_COMMAND_ID = 0x00, /**< Ver.: always */
        ZB_ZCL_GET_ALARM_RESPONSE_COMMAND_ID = 0x01, /**< Ver.: always */
 } zb_zcl_alarms_server_commands_e;
@@ -731,5 +731,4 @@ typedef enum {
 /**
  * @}
  */
-
-#endif /* __TIZEN_NETWORK_ZIGBEE_ZCL_COMMAND_IDS_H__ */
\ No newline at end of file
+#endif /* __TIZEN_NETWORK_ZIGBEE_ZCL_COMMAND_IDS_H__ */
index 37405f7..29d5de8 100644 (file)
@@ -94,10 +94,10 @@ extern "C" {
  * @see zb_zcl_door_lock_lock()
  */
 typedef void (*zb_zcl_doorlock_rsp)(
-       nwk_addr addr16,
-       unsigned char ep,
-       unsigned char status,
-       void *user_data);
+               nwk_addr addr16,
+               unsigned char ep,
+               unsigned char status,
+               void *user_data);
 
 
 /**
@@ -137,17 +137,17 @@ typedef void (*zb_zcl_doorlock_rsp)(
  * @see zb_zcl_door_lock_get_log_record()
  */
 typedef void (*zb_zcl_doorlock_get_log_record_rsp)(
-       zigbee_h handle,
-       nwk_addr addr16,
-       unsigned char ep,
-       unsigned short log_entry_id,
-       unsigned int timestamp,
-       unsigned char event_type,
-       unsigned char source,
-       unsigned char event_id,
-       unsigned char user_id,
-       const char *pin,
-       void *user_data);
+               zigbee_h handle,
+               nwk_addr addr16,
+               unsigned char ep,
+               unsigned short log_entry_id,
+               unsigned int timestamp,
+               unsigned char event_type,
+               unsigned char source,
+               unsigned char event_id,
+               unsigned char user_id,
+               const char *pin,
+               void *user_data);
 
 /**
  * @brief Command description for get pin code response
@@ -203,13 +203,13 @@ typedef void (*zb_zcl_doorlock_get_log_record_rsp)(
  * @see zb_zcldoor_lock_get_pin_code()
  */
 typedef void (*zb_zcl_doorlock_get_pin_code_rsp)(
-       nwk_addr addr16,
-       unsigned char ep,
-       unsigned short user_id,
-       unsigned char user_status,
-       unsigned char user_type,
-       const char* code,
-       void *user_data);
+               nwk_addr addr16,
+               unsigned char ep,
+               unsigned short user_id,
+               unsigned char user_status,
+               unsigned char user_type,
+               const char* code,
+               void *user_data);
 
 /**
  * @brief Command description for get user status response
@@ -231,11 +231,11 @@ typedef void (*zb_zcl_doorlock_get_pin_code_rsp)(
  * @see zb_zcldoor_lock_get_user_status()
  */
 typedef void (*zb_zcl_doorlock_get_user_status_rsp)(
-       nwk_addr addr16,
-       unsigned char ep,
-       unsigned short user_id,
-       unsigned char user_status,
-       void *user_data);
+               nwk_addr addr16,
+               unsigned char ep,
+               unsigned short user_id,
+               unsigned char user_status,
+               void *user_data);
 
 /**
  * @brief Command description for get week day schedule response
@@ -276,17 +276,17 @@ typedef void (*zb_zcl_doorlock_get_user_status_rsp)(
  * @see zb_zcl_doorlock_set_week_day_schedule()
  */
 typedef void (*zb_zcl_doorlock_get_week_day_schedule_rsp)(
-       nwk_addr addr16,
-       unsigned char ep,
-       unsigned char schedule_id,
-       unsigned short user_id,
-       unsigned char status,
-       unsigned char days_mask,
-       unsigned char start_hour,
-       unsigned char start_minute,
-       unsigned char end_hour,
-       unsigned char end_minute,
-       void *user_data);
+               nwk_addr addr16,
+               unsigned char ep,
+               unsigned char schedule_id,
+               unsigned short user_id,
+               unsigned char status,
+               unsigned char days_mask,
+               unsigned char start_hour,
+               unsigned char start_minute,
+               unsigned char end_hour,
+               unsigned char end_minute,
+               void *user_data);
 
 /**
  * @brief Command description for get year day schedule response
@@ -318,15 +318,15 @@ typedef void (*zb_zcl_doorlock_get_week_day_schedule_rsp)(
  * @see zb_zcl_doorlock_get_year_day_schedule()
  */
 typedef void (*zb_zcl_doorlock_get_year_day_schedule_rsp)(
-       nwk_addr addr16,
-       unsigned char ep,
-       unsigned char schedule_id,
-       unsigned short user_id,
-       unsigned char status,
-       unsigned int zigbee_local_start_time,
-       unsigned int zigbee_local_end_time,
-       unsigned char operating_mode_during_holiday,
-       void *user_data);
+               nwk_addr addr16,
+               unsigned char ep,
+               unsigned char schedule_id,
+               unsigned short user_id,
+               unsigned char status,
+               unsigned int zigbee_local_start_time,
+               unsigned int zigbee_local_end_time,
+               unsigned char operating_mode_during_holiday,
+               void *user_data);
 
 /**
  * @brief Command description for get holiday schedule response
@@ -363,14 +363,14 @@ typedef void (*zb_zcl_doorlock_get_year_day_schedule_rsp)(
  * @see zb_zcl_doorlock_get_holiday_schedule()
  */
 typedef void (*zb_zcl_doorlock_get_holiday_schedule_rsp)(
-       nwk_addr addr16,
-       unsigned char ep,
-       unsigned char schedule_id,
-       unsigned char status,
-       unsigned int local_start_time,
-       unsigned int local_end_time,
-       unsigned char operating_mode,
-       void *user_data);
+               nwk_addr addr16,
+               unsigned char ep,
+               unsigned char schedule_id,
+               unsigned char status,
+               unsigned int local_start_time,
+               unsigned int local_end_time,
+               unsigned char operating_mode,
+               void *user_data);
 
 /**
  * @brief Command description for get user type response
@@ -411,11 +411,11 @@ typedef void (*zb_zcl_doorlock_get_holiday_schedule_rsp)(
  * @see zb_zcl_doorlock_set_user_type()
  */
 typedef void (*zb_zcl_doorlock_get_user_type_rsp)(
-       nwk_addr addr16,
-       unsigned char ep,
-       unsigned short user_id,
-       unsigned char user_type,
-       void *user_data);
+               nwk_addr addr16,
+               unsigned char ep,
+               unsigned short user_id,
+               unsigned char user_type,
+               void *user_data);
 
 /**
  * @brief Command description for get RFID code response
@@ -465,12 +465,12 @@ typedef void (*zb_zcl_doorlock_get_user_type_rsp)(
  * @see zb_zcl_doorlock_get_rfid_code()
  */
 typedef void (*zb_zcl_doorlock_get_rfid_code_rsp)(
-       nwk_addr addr16,
-       unsigned char ep,
-       unsigned short user_id,
-       unsigned char user_type,
-       const char *rfid_code,
-       void *user_data);
+               nwk_addr addr16,
+               unsigned char ep,
+               unsigned short user_id,
+               unsigned char user_type,
+               const char *rfid_code,
+               void *user_data);
 
 #if 1
 /**
@@ -530,15 +530,15 @@ typedef void (*zb_zcl_doorlock_get_rfid_code_rsp)(
  *
  */
 typedef void (*zb_zcl_doorlock_operational_event_noti)(
-       nwk_addr addr16,
-       unsigned char ep,
-       unsigned char operation_event_source,
-       unsigned char operation_event_code,
-       unsigned short user_id,
-       unsigned char pin,
-       unsigned int local_time,
-       const char *data,
-       void *user_data);
+               nwk_addr addr16,
+               unsigned char ep,
+               unsigned char operation_event_source,
+               unsigned char operation_event_code,
+               unsigned short user_id,
+               unsigned char pin,
+               unsigned int local_time,
+               const char *data,
+               void *user_data);
 
 /**
  * @brief Description for programming event notification
@@ -592,16 +592,16 @@ typedef void (*zb_zcl_doorlock_operational_event_noti)(
  *
  */
 typedef void (*zb_zcl_doorlock_programming_event_noti)(
-       nwk_addr addr16,
-       unsigned char ep,
-       unsigned char programming_event_source,
-       unsigned char programming_event_code,
-       unsigned short user_id,
-       unsigned char pin,
-       unsigned char status,
-       unsigned int local_time,
-       const char *data,
-       void *user_data);
+               nwk_addr addr16,
+               unsigned char ep,
+               unsigned char programming_event_source,
+               unsigned char programming_event_code,
+               unsigned short user_id,
+               unsigned char pin,
+               unsigned char status,
+               unsigned int local_time,
+               const char *data,
+               void *user_data);
 #endif
 
 /* Table 10.10 Commands Received by the Server Cluster
@@ -664,10 +664,10 @@ typedef void (*zb_zcl_doorlock_programming_event_noti)(
 int zb_zcl_doorlock_lock(
                zigbee_h handle,
                nwk_addr addr16,
-        unsigned char ep,
-        const char *pin_or_rfid_code,
-        zb_zcl_doorlock_rsp cb,
-        void *user_data);
+               unsigned char ep,
+               const char *pin_or_rfid_code,
+               zb_zcl_doorlock_rsp cb,
+               void *user_data);
 
 /**
  * @brief Description for unlock door command
@@ -698,10 +698,10 @@ int zb_zcl_doorlock_lock(
 int zb_zcl_doorlock_unlock(
                zigbee_h handle,
                nwk_addr addr16,
-        unsigned char ep,
-        const char *pin_or_rfid_code,
-        zb_zcl_doorlock_rsp cb,
-        void *user_data);
+               unsigned char ep,
+               const char *pin_or_rfid_code,
+               zb_zcl_doorlock_rsp cb,
+               void *user_data);
 
 /**
  * @brief Description for toggle command
@@ -730,10 +730,10 @@ int zb_zcl_doorlock_unlock(
 int zb_zcl_doorlock_toggle(
                zigbee_h handle,
                nwk_addr addr16,
-        unsigned char ep,
-        const char *pin_or_rfid_code,
-        zb_zcl_doorlock_rsp cb,
-        void *user_data);
+               unsigned char ep,
+               const char *pin_or_rfid_code,
+               zb_zcl_doorlock_rsp cb,
+               void *user_data);
 
 /**
  * @brief Description for unlock with timeout command
@@ -767,11 +767,11 @@ int zb_zcl_doorlock_toggle(
 int zb_zcl_doorlock_unlock_with_timeout(
                zigbee_h handle,
                nwk_addr addr16,
-        unsigned char ep,
-        unsigned short timeout,
-        const char *pin_or_rfid_code,
-        zb_zcl_doorlock_rsp cb,
-        void *user_data);
+               unsigned char ep,
+               unsigned short timeout,
+               const char *pin_or_rfid_code,
+               zb_zcl_doorlock_rsp cb,
+               void *user_data);
 
 /**
  * @brief Description for get log record command
@@ -802,10 +802,10 @@ int zb_zcl_doorlock_unlock_with_timeout(
 int zb_zcl_doorlock_get_log_record(
                zigbee_h handle,
                nwk_addr addr16,
-        unsigned char ep,
-        unsigned short log_index,
-        zb_zcl_doorlock_rsp cb,
-        void *user_data);
+               unsigned char ep,
+               unsigned short log_index,
+               zb_zcl_doorlock_rsp cb,
+               void *user_data);
 
 /**
  * @brief Description for set PIN code command
@@ -863,13 +863,13 @@ int zb_zcl_doorlock_get_log_record(
 int zb_zcl_doorlock_set_pin_code(
                zigbee_h handle,
                nwk_addr addr16,
-        unsigned char ep,
-        unsigned short user_id,
-        unsigned char user_status,
-        unsigned char user_type,
-        const char *pin,
-        zb_zcl_doorlock_rsp cb,
-        void *user_data);
+               unsigned char ep,
+               unsigned short user_id,
+               unsigned char user_status,
+               unsigned char user_type,
+               const char *pin,
+               zb_zcl_doorlock_rsp cb,
+               void *user_data);
 
 /**
  * @brief Description for get PIN code command
@@ -896,10 +896,10 @@ int zb_zcl_doorlock_set_pin_code(
 int zb_zcl_doorlock_get_pin_code(
                zigbee_h handle,
                nwk_addr addr16,
-        unsigned char ep,
-        unsigned short user_id,
-        zb_zcl_doorlock_get_pin_code_rsp cb,
-        void *user_data);
+               unsigned char ep,
+               unsigned short user_id,
+               zb_zcl_doorlock_get_pin_code_rsp cb,
+               void *user_data);
 
 /**
  * @brief Description for clear PIN code command
@@ -929,10 +929,10 @@ int zb_zcl_doorlock_get_pin_code(
 int zb_zcl_doorlock_clear_pin_code(
                zigbee_h handle,
                nwk_addr addr16,
-        unsigned char ep,
-        unsigned short user_id,
-        zb_zcl_doorlock_rsp cb,
-        void *user_data);
+               unsigned char ep,
+               unsigned short user_id,
+               zb_zcl_doorlock_rsp cb,
+               void *user_data);
 
 /**
  * @brief Description for clear all PIN code command
@@ -961,9 +961,9 @@ int zb_zcl_doorlock_clear_pin_code(
 int zb_zcl_doorlock_clear_all_pin_code(
                zigbee_h handle,
                nwk_addr addr16,
-        unsigned char ep,
-        zb_zcl_doorlock_rsp cb,
-        void *user_data);
+               unsigned char ep,
+               zb_zcl_doorlock_rsp cb,
+               void *user_data);
 
 /**
  * @brief Description for set user status command
@@ -998,11 +998,11 @@ int zb_zcl_doorlock_clear_all_pin_code(
 int zb_zcl_doorlock_set_user_status(
                zigbee_h handle,
                nwk_addr addr16,
-        unsigned char ep,
-        unsigned short user_id,
-        unsigned char user_status,
-        zb_zcl_doorlock_rsp cb,
-        void *user_data);
+               unsigned char ep,
+               unsigned short user_id,
+               unsigned char user_status,
+               zb_zcl_doorlock_rsp cb,
+               void *user_data);
 
 /**
  * @brief Description for set week day command
@@ -1052,16 +1052,16 @@ int zb_zcl_doorlock_set_user_status(
 int zb_zcl_doorlock_set_week_day_schedule(
                zigbee_h handle,
                nwk_addr addr16,
-        unsigned char ep,
-        unsigned char schedule_id,
-        unsigned short user_id,
-        unsigned char days_mask,
-        unsigned char start_hour,
-        unsigned char start_minute,
-        unsigned char end_hour,
-        unsigned char end_minute,
-        zb_zcl_doorlock_rsp cb,
-        void *user_data);
+               unsigned char ep,
+               unsigned char schedule_id,
+               unsigned short user_id,
+               unsigned char days_mask,
+               unsigned char start_hour,
+               unsigned char start_minute,
+               unsigned char end_hour,
+               unsigned char end_minute,
+               zb_zcl_doorlock_rsp cb,
+               void *user_data);
 
 /**
  * @brief Description for get week day schedule command
@@ -1089,11 +1089,11 @@ int zb_zcl_doorlock_set_week_day_schedule(
 int zb_zcl_doorlock_get_week_day_schedule(
                zigbee_h handle,
                nwk_addr addr16,
-        unsigned char ep,
-        unsigned char schedule_id,
-        unsigned short user_id,
-        zb_zcl_doorlock_get_week_day_schedule_rsp cb,
-        void *user_data);
+               unsigned char ep,
+               unsigned char schedule_id,
+               unsigned short user_id,
+               zb_zcl_doorlock_get_week_day_schedule_rsp cb,
+               void *user_data);
 
 /**
  * @brief Description for set year day command
@@ -1127,13 +1127,13 @@ int zb_zcl_doorlock_get_week_day_schedule(
 int zb_zcl_doorlock_set_year_day_schedule(
                zigbee_h handle,
                nwk_addr addr16,
-        unsigned char ep,
-        unsigned char schedule_id,
-        unsigned short user_id,
-        unsigned int zigbee_local_start_time,
-        unsigned int zigbee_local_end_time,
-        zb_zcl_doorlock_rsp cb,
-        void *user_data);
+               unsigned char ep,
+               unsigned char schedule_id,
+               unsigned short user_id,
+               unsigned int zigbee_local_start_time,
+               unsigned int zigbee_local_end_time,
+               zb_zcl_doorlock_rsp cb,
+               void *user_data);
 
 /**
  * @brief Description for get year day schedule command
@@ -1161,11 +1161,11 @@ int zb_zcl_doorlock_set_year_day_schedule(
 int zb_zcl_doorlock_get_year_day_schedule(
                zigbee_h handle,
                nwk_addr addr16,
-        unsigned char ep,
-        unsigned char schedule_id,
-        unsigned short user_id,
-        zb_zcl_doorlock_get_year_day_schedule_rsp cb,
-        void *user_data);
+               unsigned char ep,
+               unsigned char schedule_id,
+               unsigned short user_id,
+               zb_zcl_doorlock_get_year_day_schedule_rsp cb,
+               void *user_data);
 
 /**
  * @brief Description for set holiday schedule command
@@ -1202,13 +1202,13 @@ int zb_zcl_doorlock_get_year_day_schedule(
 int zb_zcl_doorlock_set_holiday_schedule(
                zigbee_h handle,
                nwk_addr addr16,
-        unsigned char ep,
-        unsigned char holiday_schedule_id,
-        unsigned int zigbee_local_start_time,
-        unsigned int zigbee_local_end_time,
-        unsigned char operating_mode_during_holiday,
-        zb_zcl_doorlock_rsp cb,
-        void *user_data);
+               unsigned char ep,
+               unsigned char holiday_schedule_id,
+               unsigned int zigbee_local_start_time,
+               unsigned int zigbee_local_end_time,
+               unsigned char operating_mode_during_holiday,
+               zb_zcl_doorlock_rsp cb,
+               void *user_data);
 
 /**
  * @brief Description for get holiday schedule command
@@ -1235,10 +1235,10 @@ int zb_zcl_doorlock_set_holiday_schedule(
 int zb_zcl_doorlock_get_holiday_schedule(
                zigbee_h handle,
                nwk_addr addr16,
-        unsigned char ep,
-        unsigned char holiday_schedule_id,
-        zb_zcl_doorlock_get_holiday_schedule_rsp cb,
-        void *user_data);
+               unsigned char ep,
+               unsigned char holiday_schedule_id,
+               zb_zcl_doorlock_get_holiday_schedule_rsp cb,
+               void *user_data);
 
 /**
  * @brief Description for clear holiday schedule command
@@ -1265,10 +1265,10 @@ int zb_zcl_doorlock_get_holiday_schedule(
 int zb_zcl_doorlock_clear_holiday_schedule(
                zigbee_h handle,
                nwk_addr addr16,
-        unsigned char ep,
-        unsigned char holiday_schedule_id,
-        zb_zcl_doorlock_rsp cb,
-        void *user_data);
+               unsigned char ep,
+               unsigned char holiday_schedule_id,
+               zb_zcl_doorlock_rsp cb,
+               void *user_data);
 
 /**
  * @brief Description for set user type command
@@ -1303,11 +1303,11 @@ int zb_zcl_doorlock_clear_holiday_schedule(
 int zb_zcl_doorlock_set_user_type(
                zigbee_h handle,
                nwk_addr addr16,
-        unsigned char ep,
-        unsigned short user_id,
-        unsigned char user_type,
-        zb_zcl_doorlock_rsp cb,
-        void *user_data);
+               unsigned char ep,
+               unsigned short user_id,
+               unsigned char user_type,
+               zb_zcl_doorlock_rsp cb,
+               void *user_data);
 
 /**
  * @brief Description for get user type command
@@ -1331,10 +1331,10 @@ int zb_zcl_doorlock_set_user_type(
 int zb_zcl_doorlock_get_user_type(
                zigbee_h handle,
                nwk_addr addr16,
-        unsigned char ep,
-        unsigned short user_id,
-        zb_zcl_doorlock_get_user_type_rsp cb,
-        void *user_data);
+               unsigned char ep,
+               unsigned short user_id,
+               zb_zcl_doorlock_get_user_type_rsp cb,
+               void *user_data);
 
 /**
  * @brief Description for set RFID code command
@@ -1372,13 +1372,13 @@ int zb_zcl_doorlock_get_user_type(
 int zb_zcl_doorlock_set_rfid_code(
                zigbee_h handle,
                nwk_addr addr16,
-        unsigned char ep,
-        unsigned short user_id,
-        unsigned char user_status,
-        unsigned char user_type,
-        const char *rfid_code,
-        zb_zcl_doorlock_rsp cb,
-        void *user_data);
+               unsigned char ep,
+               unsigned short user_id,
+               unsigned char user_status,
+               unsigned char user_type,
+               const char *rfid_code,
+               zb_zcl_doorlock_rsp cb,
+               void *user_data);
 
 
 /**
@@ -1406,10 +1406,10 @@ int zb_zcl_doorlock_set_rfid_code(
 int zb_zcl_doorlock_get_rfid_code(
                zigbee_h handle,
                nwk_addr addr16,
-        unsigned char ep,
-        unsigned short user_id,
-        zb_zcl_doorlock_get_rfid_code_rsp cb,
-        void *user_data);
+               unsigned char ep,
+               unsigned short user_id,
+               zb_zcl_doorlock_get_rfid_code_rsp cb,
+               void *user_data);
 
 
 /**
@@ -1440,10 +1440,10 @@ int zb_zcl_doorlock_get_rfid_code(
 int zb_zcl_doorlock_clear_rfid_code(
                zigbee_h handle,
                nwk_addr addr16,
-        unsigned char ep,
-        unsigned short user_id,
-        zb_zcl_doorlock_rsp cb,
-        void *user_data);
+               unsigned char ep,
+               unsigned short user_id,
+               zb_zcl_doorlock_rsp cb,
+               void *user_data);
 
 /**
  * @brief Description for clear all RFID code command
@@ -1472,9 +1472,9 @@ int zb_zcl_doorlock_clear_rfid_code(
 int zb_zcl_doorlock_clear_all_rfid_code(
                zigbee_h handle,
                nwk_addr addr16,
-        unsigned char ep,
-        zb_zcl_doorlock_rsp cb,
-        void *user_data);
+               unsigned char ep,
+               zb_zcl_doorlock_rsp cb,
+               void *user_data);
 /**
  * @}
  */
index 148ce0e..dad7999 100644 (file)
@@ -69,11 +69,11 @@ extern "C" {
  * @see zb_zcl_group_add_group()
  */
 typedef void (*zb_zcl_group_add_group_rsp)(
-        nwk_addr addr16,
-        unsigned char ep,
-        unsigned char status,
-        unsigned short group_id,
-        void *user_data);
+               nwk_addr addr16,
+               unsigned char ep,
+               unsigned char status,
+               unsigned short group_id,
+               void *user_data);
 
 /**
  * @brief Command description for view group response
@@ -117,13 +117,13 @@ typedef void (*zb_zcl_group_view_group_rsp)(
  *
  * @see zb_zcl_group_view_group_membership()
  */
- typedef void (*zb_zcl_group_get_group_membership_rsp)(
-        nwk_addr addr16,
-        unsigned char ep,
-        unsigned char capacity,
-        unsigned char group_count,
-        unsigned short *group_list,
-        void *user_data);
+typedef void (*zb_zcl_group_get_group_membership_rsp)(
+               nwk_addr addr16,
+               unsigned char ep,
+               unsigned char capacity,
+               unsigned char group_count,
+               unsigned short *group_list,
+               void *user_data);
 
 /**
  * @brief Command description for remove group response
@@ -143,11 +143,11 @@ typedef void (*zb_zcl_group_view_group_rsp)(
  * @see zb_zcl_group_add_group()
  */
 typedef void (*zb_zcl_group_remove_group_rsp)(
-        nwk_addr addr16,
-        unsigned char ep,
-        unsigned char status,
-        unsigned short group_id,
-        void *user_data);
+               nwk_addr addr16,
+               unsigned char ep,
+               unsigned char status,
+               unsigned short group_id,
+               void *user_data);
 
 /* Table 3.32 Received Command IDs for the Groups Cluster
  * +--------------------------------+--------------------------------------+------------+
@@ -192,7 +192,7 @@ int zb_zcl_group_add_group(
                nwk_addr addr16,
                unsigned char ep,
                unsigned short group_id,
-               const char *group_name,
+               char *group_name,
                zb_zcl_group_add_group_rsp cb,
                void *user_data);
 
@@ -224,9 +224,9 @@ int zb_zcl_group_view_group(
                zigbee_h handle,
                nwk_addr addr16,
                unsigned char ep,
-        unsigned short group_id,
-        zb_zcl_group_view_group_rsp cb,
-        void *user_data);
+               unsigned short group_id,
+               zb_zcl_group_view_group_rsp cb,
+               void *user_data);
 
 /**
  * @brief Command description for get group membership
@@ -256,10 +256,10 @@ int zb_zcl_group_get_group_membership(
                zigbee_h handle,
                nwk_addr addr16,
                unsigned char ep,
-        unsigned char group_count,
-        unsigned short *group_list,
-        zb_zcl_group_get_group_membership_rsp cb,
-        void *user_data);
+               unsigned char group_count,
+               unsigned short *group_list,
+               zb_zcl_group_get_group_membership_rsp cb,
+               void *user_data);
 
 /**
  * @brief Command description for remove group
@@ -290,9 +290,9 @@ int zb_zcl_group_remove_group(
                zigbee_h handle,
                nwk_addr addr16,
                unsigned char ep,
-        unsigned short group_id,
-        zb_zcl_group_remove_group_rsp cb,
-        void *user_data);
+               unsigned short group_id,
+               zb_zcl_group_remove_group_rsp cb,
+               void *user_data);
 
 /**
  * @brief Command description for remove group
@@ -349,8 +349,8 @@ int zb_zcl_group_add_group_if_identifying(
                zigbee_h handle,
                nwk_addr addr16,
                unsigned char ep,
-        unsigned short group_id,
-        const char *group_name);
+               unsigned short group_id,
+               const char *group_name);
 
 /**
  * @}
index f26e1cf..51fe7a7 100644 (file)
@@ -69,11 +69,11 @@ extern "C" {
 typedef enum {
        ZB_ZCL_IAS_ZONE_ENROLL_SUCCESS = 0x00, /**< Success */
        ZB_ZCL_IAS_ZONE_ENROLL_NOT_SUPPORT = 0x01, /**< This specific Zone type is not known
-                                                    to the CIE and is not supported */
+                                                                                               to the CIE and is not supported */
        ZB_ZCL_IAS_ZONE_ENROLL_NO_ENROLL_PERMIT = 0x02, /**< CIE does not permit new zones to
-                                                         enroll at this time. */
+                                                                                                       enroll at this time. */
        ZB_ZCL_IAS_ZONE_ENROLL_TOO_MANY_ZONE = 0x03, /**< CIE reached its limit of number of
-                                                      enrolled zones */
+                                                                                                       enrolled zones */
 } zb_ias_zone_enroll_response_e;
 
 /**
index 4104855..c32a7ca 100644 (file)
@@ -83,4 +83,5 @@ int zb_zdo_set_compatible_startup_parameters(
 }
 #endif
 
-#endif /* __TIZEN_NETWORK_ZIGBEE_ZDO_CONFIG_H__ */
\ No newline at end of file
+#endif /* __TIZEN_NETWORK_ZIGBEE_ZDO_CONFIG_H__ */
+
index 70628db..e4c3c16 100644 (file)
@@ -537,8 +537,8 @@ int zb_zdo_extended_simple_desc_req(
  *                    #ZB_ZDP_INV_REQUESTTYPE \n
  *                    #ZB_ZDP_NO_DESCRIPTOR
  * @param[out] addr16 Network address for the request
- * @param[out] match_length The count of endpoint on the remote device that match the
- *                          match the request criteria
+ * @param[out] match_length The count of endpoint on the remote device that match
+ *                          the request criteria
  * @param[out] match_list List of bytes each of which represents an 8-bit endpoint
  * @param[out] user_data user data
  *
index 99fbc78..9eb2174 100644 (file)
@@ -193,8 +193,8 @@ typedef struct zb_zdo_node_descriptor_s* zb_zdo_node_descriptor_h;
  */
 typedef enum {
        ZB_ZDP_RECEVIER_SYNCHRONIZED_WITH_RECEVIER_ON = 0, /**< Register Synchronized with Receiver On */
-       ZB_ZDP_RECEIVER_COMES_ON_PERIODICALLY = ( 1 << 0), /**< Register Comes on Periodically */
-       ZB_ZDP_RECEIVER_COMES_ON_WHEN_STIMULATED = ( 1 << 1), /**< Register Comes on When Stimulated */
+       ZB_ZDP_RECEIVER_COMES_ON_PERIODICALLY = (1 << 0), /**< Register Comes on Periodically */
+       ZB_ZDP_RECEIVER_COMES_ON_WHEN_STIMULATED = (1 << 1), /**< Register Comes on When Stimulated */
 } zb_zdo_current_power_mode_e;
 
 /**
index 4f739ea..cbfeb29 100644 (file)
@@ -500,9 +500,8 @@ static void _zbl_deregister_global_req(zigbee_h handle, zbl_req_cb_s *container)
        /* Remove item if exists */
        DBG("Remove global cmd info");
        item = g_list_find_custom(list, container, _global_compare_func);
-       if (NULL != item) {
+       if (NULL != item)
                handle->global_cmd_req = g_list_remove(list, container);
-       }
 }
 
 static void _zbl_remove_global_req(zigbee_h handle, unsigned char ep,
@@ -1095,7 +1094,7 @@ static void _zbl_request_cleanup(gpointer data)
 
 static gboolean _zbl_timeout_cb(gpointer p)
 {
-       zbl_req_cb_s *container =(zbl_req_cb_s *)p;
+       zbl_req_cb_s *container = (zbl_req_cb_s *)p;
 
        RETVM_IF(NULL == gdbus_conn, G_SOURCE_REMOVE, "gdbus_conn is NULL");
        RETVM_IF(NULL == p, G_SOURCE_REMOVE, "container is NULL");
@@ -1151,9 +1150,8 @@ static gboolean _zbl_timeout_cb(gpointer p)
                zb_zdo_binding_table_h *records = NULL;
 
                records = calloc(1, sizeof(zb_zdo_binding_table_h));
-               if (records) {
+               if (records)
                        records[0] = calloc(1, sizeof(struct zb_zdo_binding_table_s));
-               }
 
                cb(ZB_ZDP_TIMEOUT, 0, 0, 0, records, container->userdata);
 
@@ -1166,9 +1164,9 @@ static gboolean _zbl_timeout_cb(gpointer p)
                zb_zdo_neighbor_table_desc_h *records = NULL;
 
                records = calloc(1, sizeof(zb_zdo_neighbor_table_desc_h));
-               if (records) {
+               if (records)
                        records[0] = calloc(1, sizeof(struct zb_zdo_neighbor_table_desc_s));
-               }
+
                cb(ZB_ZDP_TIMEOUT, 0, 0, 0, records, container->userdata);
 
                free(records[0]);
@@ -1180,9 +1178,9 @@ static gboolean _zbl_timeout_cb(gpointer p)
                zb_zdo_routing_table_h *records = NULL;
 
                records = calloc(1, sizeof(zb_zdo_routing_table_h));
-               if (records) {
+               if (records)
                        records[0] = calloc(1, sizeof(struct zb_zdo_routing_table_s));
-               }
+
                cb(ZB_ZDP_TIMEOUT, 0, 0, 0, records, container->userdata);
 
                free(records[0]);
@@ -1193,9 +1191,9 @@ static gboolean _zbl_timeout_cb(gpointer p)
                zb_zdo_mgmt_nwk_disc_rsp cb = container->cb;
                zb_zdo_network_list_record_h *records = NULL;
                records = calloc(1, sizeof(zb_zdo_network_list_record_h));
-               if (records) {
+               if (records)
                        records[0] = calloc(1, sizeof(struct zb_zdo_network_list_record_s));
-               }
+
                cb(0, 0, 0, 0, records, container->userdata);
                free(records[0]);
                free(records);
@@ -2039,9 +2037,9 @@ MGMT_NWK_DISC_REQ_OUT:
 
                if (payload_len > 0) {
                        payload = calloc(payload_len+1, sizeof(unsigned char));
-                       while (g_variant_iter_loop(payload_iter, "(y)", &value)) {
+                       while (g_variant_iter_loop(payload_iter, "(y)", &value))
                                payload[i++] = value;
-                       }
+
                        if (NULL != payload_iter)
                                g_variant_iter_free(payload_iter);
                }
@@ -2072,9 +2070,9 @@ MGMT_NWK_DISC_REQ_OUT:
 
                if (payload_len > 0) {
                        payload = calloc(payload_len + 1, sizeof(unsigned char));
-                       while (g_variant_iter_loop(payload_iter, "(y)", &value)) {
+                       while (g_variant_iter_loop(payload_iter, "(y)", &value))
                                payload[i++] = value;
-                       }
+
                        if (NULL != payload_iter)
                                g_variant_iter_free(payload_iter);
                }
@@ -2098,9 +2096,9 @@ MGMT_NWK_DISC_REQ_OUT:
 
                if (length > 0) {
                        data = calloc(length, sizeof(unsigned char));
-                       while (g_variant_iter_loop(payload_iter, "(y)", &value)) {
+                       while (g_variant_iter_loop(payload_iter, "(y)", &value))
                                data[i++] = value;
-                       }
+
                        if (NULL != payload_iter)
                                g_variant_iter_free(payload_iter);
                }
@@ -2926,7 +2924,7 @@ int zbl_enable(zigbee_h handle, zb_event_cb event_handler)
 
        g_variant_get(variant, "(ib)", &result, &enabled);
        DBG("ret = [0x%x]", result);
-       if(variant)
+       if (variant)
                g_variant_unref(variant);
 
        return result;
@@ -4762,9 +4760,8 @@ int zbl_aps_send(nwk_addr addr16, unsigned char aps_frame_ctl, unsigned char src
 
        payload_builder = g_variant_builder_new(G_VARIANT_TYPE("a(y)"));
        if (payload_len > 0) {
-               for (i = payload_len - 1; i >= 0 ; i--) {
+               for (i = payload_len - 1; i >= 0 ; i--)
                        g_variant_builder_add(payload_builder, "(y)", payload[i]);
-               }
        }
        payload_variant = g_variant_builder_end(payload_builder);
        g_variant_builder_unref(payload_builder);
@@ -4827,9 +4824,8 @@ int zbl_zcl_send(nwk_addr addr16, unsigned char src_ep, unsigned char dst_ep,
 
        payload_builder = g_variant_builder_new(G_VARIANT_TYPE("a(y)"));
        if (payload_len > 0) {
-               for (i = payload_len - 1; i >= 0 ; i--) {
+               for (i = payload_len - 1; i >= 0 ; i--)
                        g_variant_builder_add(payload_builder, "(y)", payload[i]);
-               }
        }
        payload_variant = g_variant_builder_end(payload_builder);
        g_variant_builder_unref(payload_builder);
@@ -4889,9 +4885,8 @@ int zbl_send_to_local(unsigned short length, unsigned char *data,
 
        payload_builder = g_variant_builder_new(G_VARIANT_TYPE("a(y)"));
        if (length > 0) {
-               for (i = length - 1; i >= 0 ; i--) {
+               for (i = length - 1; i >= 0 ; i--)
                        g_variant_builder_add(payload_builder, "(y)", data[i]);
-               }
        }
        payload_variant = g_variant_builder_end(payload_builder);
        g_variant_builder_unref(payload_builder);
@@ -6697,7 +6692,8 @@ int zbl_view_group(nwk_addr addr16, unsigned char ep, unsigned short group_id,
        DBG("ret = [0x%x]", result);
        g_variant_unref(variant);
 
-       return result;}
+       return result;
+}
 
 int zbl_group_get_group_membership(nwk_addr addr16, unsigned char ep,
                unsigned char group_count, unsigned short *group_list,
@@ -6828,7 +6824,7 @@ int zbl_remove_all_group(nwk_addr addr16, unsigned char ep)
        DBG("zbl_group_remove_all_group()");
 
        variant = g_dbus_proxy_call_sync(zcl_group_proxy, "remove_all_group",
-               g_variant_new("(qy)", addr16, ep),G_DBUS_CALL_FLAGS_NONE, -1, NULL, &dbus_err);
+               g_variant_new("(qy)", addr16, ep), G_DBUS_CALL_FLAGS_NONE, -1, NULL, &dbus_err);
 
        if (!variant) {
                ERR("Failed to get 'remove_all_group' [%s]", dbus_err->message);
index e761be2..0c6555a 100644 (file)
@@ -22,7 +22,7 @@
 #include "zbl-dbus.h"
 
 API int zb_zcl_group_add_group(zigbee_h handle, nwk_addr addr16,
-               unsigned char ep, unsigned short group_id, const char *group_name,
+               unsigned char ep, unsigned short group_id, char *group_name,
                zb_zcl_group_add_group_rsp cb, void *user_data)
 {
        int ret;
index aa43b2d..eb86d96 100644 (file)
@@ -44,9 +44,8 @@ void _zb_aps_send_rsp(nwk_addr addr16, unsigned char src_ep, unsigned char dst_e
        msg("  payload_len : 0x%04X", payload_len);
        msg("  payload : ");
        msgn("      ");
-       for (i = 0 ; i < payload_len; i++) {
+       for (i = 0 ; i < payload_len; i++)
                msgn("%X ", payload[i]);
-       }
        msgn("\n");
 }
 
@@ -63,9 +62,8 @@ void _zb_zcl_send_rsp(nwk_addr addr16, unsigned char src_ep, unsigned char dst_e
        msg("  payload_len : 0x%04X", payload_len);
        msg("  payload : ");
        msgn("      ");
-       for (i = 0 ; i < payload_len; i++) {
+       for (i = 0 ; i < payload_len; i++)
                msgn("%X ", payload[i]);
-       }
        msgn("\n");
 }
 
@@ -76,9 +74,8 @@ void _zb_send_to_local_rsp(unsigned short length, unsigned char *data, void *use
        msg("  length : 0x%04X", length);
        msg("  data : ");
        msgn("      ");
-       for (i = 0 ; i < length; i++) {
+       for (i = 0 ; i < length; i++)
                msgn("%X ", data[i]);
-       }
        msgn("\n");
 }
 
index 8ef8b16..6395556 100644 (file)
@@ -695,7 +695,7 @@ static int run_choose_end_device_list(MManager *mm, struct menu_data *menu)
                msg("\n");
        }
 
-       return RET_SUCCESS;
+       return ret;
 }
 
 static int run_select_device(MManager *mm, struct menu_data *menu)
index 95c4453..a36b3f3 100644 (file)
@@ -41,33 +41,33 @@ __BEGIN_DECLS
 #define ANSI_COLOR_WHITE               "\e[1;37m"
 
 
-#define msg(fmt,args...)       do { fprintf(stdout, fmt "\n", ##args); \
+#define msg(fmt, args...)      do { fprintf(stdout, fmt "\n", ##args); \
                fflush(stdout); } while (0)
-#define msgn(fmt,args...)      do { fprintf(stdout, fmt, ##args); \
+#define msgn(fmt, args...)     do { fprintf(stdout, fmt, ##args); \
                fflush(stdout); } while (0)
 
 /* Bold (green) */
-#define msgb(fmt,args...)  do { fprintf(stdout, ANSI_COLOR_LIGHTGREEN fmt \
+#define msgb(fmt, args...)  do { fprintf(stdout, ANSI_COLOR_LIGHTGREEN fmt \
                ANSI_COLOR_NORMAL "\n", ##args); fflush(stdout); } while (0)
 
 /* Property message */
-#define msgp(fmt,args...) do { fprintf(stdout, ANSI_COLOR_LIGHTMAGENTA fmt \
+#define msgp(fmt, args...) do { fprintf(stdout, ANSI_COLOR_LIGHTMAGENTA fmt \
                ANSI_COLOR_NORMAL "\n", ##args); fflush(stdout); } while (0)
 
-#define msgt(n,fmt,args...) do { fprintf(stdout, "\e[%dC" fmt "\n", \
+#define msgt(n, fmt, args...) do { fprintf(stdout, "\e[%dC" fmt "\n", \
                3 + ((n) * 2), ##args); fflush(stdout); } while (0)
 
-#define pmsg(fmt,args...) do { \
-       if (is_pid_show()) { fprintf(stdout, "(%5d) ", get_tid()); } \
+#define pmsg(fmt, args...) do { \
+       if (is_pid_show()) { fprintf(stdout, "(%5d) ", get_tid());; } \
        fprintf(stdout, fmt "\n", ##args); fflush(stdout); } while (0)
 
-#define pmsgb(fmt,args...) do { \
-       if (is_pid_show()) { fprintf(stdout, "(%5d) ", get_tid()); } \
+#define pmsgb(fmt, args...) do { \
+       if (is_pid_show()) { fprintf(stdout, "(%5d) ", get_tid());; } \
        fprintf(stdout, ANSI_COLOR_LIGHTGREEN fmt \
                        ANSI_COLOR_NORMAL "\n", ##args); fflush(stdout); } while (0)
 
-#define pmsgt(n,fmt,args...) do { \
-       if (is_pid_show()) { fprintf(stdout, "(%5d) ", get_tid()); } \
+#define pmsgt(n, fmt, args...) do { \
+       if (is_pid_show()) { fprintf(stdout, "(%5d) ", get_tid());; } \
        fprintf(stdout, "\e[%dC" fmt "\n", \
                        3 + ((n) * 2), ##args); fflush(stdout); } while (0)
 
@@ -86,7 +86,7 @@ __BEGIN_DECLS
 #define HR_SINGLE2     " ---------------------------------------" \
                                        "------------------------ "
 
-#define MAX_WIDTH      strlen (HR_SINGLE)
+#define MAX_WIDTH      strlen(HR_SINGLE)
 #define MAX_TITLE      ((MAX_WIDTH) - 10)
 #define POS_MORE       ((MAX_WIDTH) - 3)
 #define RET_SUCCESS 0
@@ -110,10 +110,10 @@ void*     menu_manager_ref_user_data(MManager *mm);
 gboolean  on_menu_manager_keyboard(GIOChannel *src, GIOCondition con,
                gpointer data);
 
-pid_t     get_tid ();
-void      hide_pid ();
-void      show_pid ();
-int       is_pid_show ();
+pid_t     get_tid();
+void      hide_pid();
+void      show_pid();
+int       is_pid_show();
 void      menu_print_dump(int data_len, void *data);
 
 __END_DECLS
index 2e647a9..f0c3ab1 100644 (file)
@@ -829,7 +829,7 @@ static void zigbee_simple_desc_rsp(nwk_addr addr16, unsigned char len,
 }
 
 static void zigbee_match_desc_rsp(unsigned char status, nwk_addr addr16,
-       unsigned char match_length, unsigned char **match_list, void *user_data)
+       unsigned char match_length, unsigned char *match_list, void *user_data)
 {
        unsigned char i;
        printf("nwk_addr = %04X status = %02X match_length = %d\n", addr16, status, match_length);