Apply coding rule 66/183866/1
authorJihoon Jung <jh8801.jung@samsung.com>
Tue, 3 Jul 2018 06:30:07 +0000 (15:30 +0900)
committersaerome.kim <saerome.kim@samsung.com>
Thu, 12 Jul 2018 02:30:19 +0000 (11:30 +0900)
Change-Id: I128899b0591188f63a8169d3a019a53a3173f431
Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com>
src/mdg_dbus.c
src/mdg_private.h
src/mdg_util.c
test/mdg-manager.c
test/menu.h

index 20201fe..6038c3d 100755 (executable)
@@ -124,9 +124,8 @@ static void __event_cb(Group *object,
                                channel = tmp_channel;
                }
 
-               if (channel != NULL) {
+               if (channel != NULL)
                                channel->cb(0, device_id, channel_id, data, data_len, channel->user_data);
-               }
 
        } else {
                _ERR("Unknown Event");
index 78a667d..35f6beb 100755 (executable)
@@ -153,7 +153,7 @@ typedef struct _mdg_manager_s {
 } mdg_manager_s;
 
 #define CHECK_HANDLE_IS_VALID(handle) { \
-       if (g_slist_find (handle_list, handle) == NULL) \
+       if (g_slist_find(handle_list, handle) == NULL) \
                return MDG_ERROR_UNKNOWN; \
 }
 
index abea395..9282b3a 100755 (executable)
@@ -174,9 +174,8 @@ void mdg_get_data_from_variant(GVariant *va, char **device_id, char **channel_id
        *data = (unsigned char *)g_try_malloc0(*data_len + 1);
 
        g_variant_get(data_va, "a(y)", &data_iter);
-       while (g_variant_iter_loop(data_iter, "(y)", &byte_data)) {
+       while (g_variant_iter_loop(data_iter, "(y)", &byte_data))
                (*data)[i++] = byte_data;
-       }
 
        g_variant_iter_free(iter);
 }
index 96141e2..0d21f01 100755 (executable)
@@ -55,7 +55,7 @@ static const char* __device_type_to_string(mdg_device_type_e type)
                return "Local";
        case MDG_DEVICE_TYPE_REMOTE:
                return "Remote";
-       default :
+       default:
                return "Unknown";
        }
 }
index 728d36c..fcfcfc8 100755 (executable)
@@ -62,16 +62,19 @@ __BEGIN_DECLS
                3 + ((n) * 2), ##args); fflush(stdout); } while (0)
 
 #define pmsg(fmt, args...) do { \
-       if (is_pid_show()) { fprintf(stdout, "(%5d) ", get_tid()); } \
+       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()); } \
+       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()); } \
+       if (is_pid_show()) \
+               fprintf(stdout, "(%5d) ", get_tid()); \
        fprintf(stdout, "\e[%dC" fmt "\n", \
                        3 + ((n) * 2), ##args); fflush(stdout); } while (0)