Adjust coding rule 83/149283/1
authorSeungha Son <seungha.son@samsung.com>
Tue, 12 Sep 2017 04:47:56 +0000 (13:47 +0900)
committerSeungha Son <seungha.son@samsung.com>
Tue, 12 Sep 2017 04:48:47 +0000 (13:48 +0900)
 do not use assignment in if condition
 code indent
 dupliated semicolon

Signed-off-by: Seungha Son <seungha.son@samsung.com>
Change-Id: I194312e48615e170031865e3da8af7c5d0124a47

src/message_port_local.c
src/message_port_remote.c

index dce4571..39b7ea6 100755 (executable)
@@ -301,7 +301,7 @@ static message_port_remote_app_info_s *__set_remote_app_info(const char *remote_
 
        remote_app_info->remote_app_id = strdup(remote_app_id);
        if (remote_app_info->remote_app_id == NULL) {
-               ret_val = MESSAGE_PORT_ERROR_OUT_OF_MEMORY;;
+               ret_val = MESSAGE_PORT_ERROR_OUT_OF_MEMORY;
                goto out;
        }
 
@@ -559,7 +559,7 @@ static int __send_delayed_message(int sockfd, delay_message_info_s *message)
                        offset = message->sent_bytes;
 
                ret = write_socket(sockfd, (char *)message->data + offset,
-                       message->data_len -offset, &nb, &sequence);
+                       message->data_len - offset, &nb, &sequence);
 
                if (ret != MESSAGE_PORT_ERROR_NONE) {
                        _LOGE("write data fail");
@@ -576,9 +576,9 @@ static int __send_delayed_message(int sockfd, delay_message_info_s *message)
 out:
        if (ret == MESSAGE_PORT_ERROR_RESOURCE_UNAVAILABLE) {
                if (is_startline)
-                        message->sent_bytes += nb;
+                       message->sent_bytes += nb;
                else
-                        message->sent_bytes = nb;
+                       message->sent_bytes = nb;
 
                message->sequence = sequence;
                _LOGE("send_delayed_message fail : sockfd (%d) sequence(%d) sent byte(%d)",
index 10c23a5..72b1df9 100755 (executable)
@@ -303,13 +303,15 @@ static gboolean __socket_request_handler(GIOChannel *gio,
                return FALSE;
        }
 
-       if ((fd = g_io_channel_unix_get_fd(gio)) < 0) {
+       fd = g_io_channel_unix_get_fd(gio);
+       if (fd < 0) {
                _LOGE("fail to get fd from io channel");
                __callback_info_free_by_info(mi);
                return FALSE;
        }
 
-       if ((pkt = __message_port_recv_raw(fd)) == NULL) {
+       pkt = __message_port_recv_raw(fd);
+       if (pkt == NULL) {
                _LOGE("recv error on SOCKET");
                __callback_info_free_by_info(mi);
                return FALSE;