From: Jihoon Jung Date: Tue, 3 Jul 2018 06:30:07 +0000 (+0900) Subject: Apply coding rule X-Git-Tag: submit/tizen/20190131.065036~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=82cefe8b93062e77755f7ecc031a066dcba16385;p=platform%2Fcore%2Fapi%2Fmulti-device-group.git Apply coding rule Change-Id: I128899b0591188f63a8169d3a019a53a3173f431 Signed-off-by: Jihoon Jung --- diff --git a/src/mdg_dbus.c b/src/mdg_dbus.c index 20201fe..6038c3d 100755 --- a/src/mdg_dbus.c +++ b/src/mdg_dbus.c @@ -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"); diff --git a/src/mdg_private.h b/src/mdg_private.h index 78a667d..35f6beb 100755 --- a/src/mdg_private.h +++ b/src/mdg_private.h @@ -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; \ } diff --git a/src/mdg_util.c b/src/mdg_util.c index abea395..9282b3a 100755 --- a/src/mdg_util.c +++ b/src/mdg_util.c @@ -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); } diff --git a/test/mdg-manager.c b/test/mdg-manager.c index 96141e2..0d21f01 100755 --- a/test/mdg-manager.c +++ b/test/mdg-manager.c @@ -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"; } } diff --git a/test/menu.h b/test/menu.h index 728d36c..fcfcfc8 100755 --- a/test/menu.h +++ b/test/menu.h @@ -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)