Fixed coding rule issues 19/95919/1
authorhyunuktak <hyunuk.tak@samsung.com>
Mon, 7 Nov 2016 06:11:36 +0000 (15:11 +0900)
committerhyunuktak <hyunuk.tak@samsung.com>
Mon, 7 Nov 2016 06:11:39 +0000 (15:11 +0900)
Change-Id: Ia4380b3fcc89e1f332f45ebfa809356f7975029c
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
packaging/net-config.spec
src/dbus/netdbus.c
src/network-monitor.c
src/signal-handler.c
src/utils/util.c
src/wifi-background-scan.c
src/wifi-config.c
src/wifi-power.c
src/wifi-ssid-scan.c
src/wifi-state.c
src/wifi-wps.c

index 16ecae3..e07cd5b 100755 (executable)
@@ -1,6 +1,6 @@
 Name:          net-config
 Summary:       TIZEN Network Configuration service
-Version:       1.1.92
+Version:       1.1.93
 Release:       2
 Group:         System/Network
 License:       Apache-2.0
index 7e78176..c982aea 100755 (executable)
@@ -324,7 +324,7 @@ int setup_gdbus(got_name_cb cb)
                exit(1);
        }
 
-       manager_server_vpn= g_dbus_object_manager_server_new(NETCONFIG_VPNSVC_PATH);
+       manager_server_vpn = g_dbus_object_manager_server_new(NETCONFIG_VPNSVC_PATH);
        if (manager_server_vpn == NULL) {
                ERR("Manager server for VPNSVC_PATH not created.");
                exit(1);
index bce7bfe..21e6de7 100755 (executable)
@@ -45,9 +45,9 @@ int netconfig_ethernet_cable_plugin_status_check()
        int ret = -1;
        FILE *fd = NULL;
        char error_buf[MAX_SIZE_ERROR_BUFFER] = {0, };
-       if(0 == access(ETHERNET_CABLE_STATUS, F_OK)) {
+       if (0 == access(ETHERNET_CABLE_STATUS, F_OK)) {
                fd = fopen(ETHERNET_CABLE_STATUS, "r");
-               if(fd == NULL) {
+               if (fd == NULL) {
                        ERR("Error! Could not open /sys/class/net/eth0/carrier file\n");
                        return -1;
                }
@@ -59,21 +59,21 @@ int netconfig_ethernet_cable_plugin_status_check()
        int rv = 0;
        errno = 0;
        rv = fscanf(fd, "%d", &ret);
-       if(rv < 0) {
+       if (rv < 0) {
                strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER);
                ERR("Error! Failed to read from file, rv:[%d], error:[%s]", rv, error_buf);
                fclose(fd);
                return -1;
        }
 
-       if(ret == 1) {
-               if(!g_chk_eth_send_notification) {
+       if (ret == 1) {
+               if (!g_chk_eth_send_notification) {
                        ERR("/sys/class/net/eth0/carrier : [%d]", ret);
                        netconfig_network_notify_ethernet_cable_state("ATTACHED");
                }
                g_chk_eth_send_notification = TRUE;
        } else if (ret == 0) {
-               if(g_chk_eth_send_notification) {
+               if (g_chk_eth_send_notification) {
                        ERR("/sys/class/net/eth0/carrier : [%d]", ret);
                        netconfig_network_notify_ethernet_cable_state("DETACHED");
                }
index 304234d..616448c 100755 (executable)
@@ -524,7 +524,7 @@ static void _supplicant_session_overlapped(GDBusConnection *conn,
 {
        DBG("Driver session overlapped handling!");
        ERR("WPS PBC SESSION OVERLAPPED");
-#if defined TIZEN_WEARABLE 
+#if defined TIZEN_WEARABLE
        return;
 #else
        netconfig_send_message_to_net_popup("WPS Error",
index 9755f48..8376291 100755 (executable)
@@ -773,7 +773,8 @@ gboolean handle_launch_direct(Wifi *wifi, GDBusMethodInvocation *context)
 #endif
 }
 
-int execute_mdnsd_script(char* op) {
+int execute_mdnsd_script(char* op)
+{
        const char *path = "/usr/bin/mdnsresponder-server.sh";
        char *const args[] = { "mdnsresponder-server.sh", op, NULL };
        char *const envs[] = { NULL };
index 9894809..8172fdf 100755 (executable)
@@ -92,7 +92,7 @@ static void __netconfig_wifi_scan_request_reply(GObject *source_object, GAsyncRe
        GDBusConnection *conn = NULL;
        GError *error = NULL;
 
-       conn = G_DBUS_CONNECTION (source_object);
+       conn = G_DBUS_CONNECTION(source_object);
        reply = g_dbus_connection_call_finish(conn, res, &error);
 
        if (reply == NULL) {
index 080fb6f..1c590dd 100755 (executable)
@@ -619,7 +619,7 @@ gboolean handle_get_config_ids(Wifi *wifi, GDBusMethodInvocation *context)
        wifi_complete_get_config_ids(wifi, context, (const gchar * const *)result);
 
        for (i = 0; i < length; i++)
-               if(result[i])
+               if (result[i])
                        g_free(result[i]);
 
        if (result)
@@ -811,14 +811,14 @@ gboolean handle_load_eap_configuration(Wifi *wifi, GDBusMethodInvocation *contex
        g_variant_builder_add(b, "{sv}", WIFI_CONFIG_NAME, g_variant_new_string(conf->name));
        g_variant_builder_add(b, "{sv}", WIFI_CONFIG_SECURITY_TYPE, g_variant_new_string(conf->security_type));
        g_variant_builder_add(b, "{sv}", WIFI_CONFIG_HIDDEN, g_variant_new_string(conf->is_hidden));
-       if (conf->proxy_address != NULL) {
+       if (conf->proxy_address != NULL)
                g_variant_builder_add(b, "{sv}", WIFI_CONFIG_PROXYADDRESS, g_variant_new_string(conf->proxy_address));
-       else
+       else
                g_variant_builder_add(b, "{sv}", WIFI_CONFIG_PROXYADDRESS, g_variant_new_string("NONE"));
 
-       if (conf->last_error != NULL) {
+       if (conf->last_error != NULL)
                g_variant_builder_add(b, "{sv}", WIFI_CONFIG_FAILURE, g_variant_new_string(conf->last_error));
-       else
+       else
                g_variant_builder_add(b, "{sv}", WIFI_CONFIG_FAILURE, g_variant_new_string("ERROR_NONE"));
 
        if (conf->eap_config != NULL) {
index 535203c..2ef365e 100755 (executable)
@@ -98,7 +98,7 @@ static void __technology_reply(GObject *source_object, GAsyncResult *res, gpoint
        GDBusConnection *conn = NULL;
        GError *error = NULL;
 
-       conn = G_DBUS_CONNECTION (source_object);
+       conn = G_DBUS_CONNECTION(source_object);
        reply = g_dbus_connection_call_finish(conn, res, &error);
 
        if (reply == NULL) {
index e6ba5f4..d07a0f2 100755 (executable)
@@ -217,7 +217,7 @@ static void _emit_ssid_scan_completed(void)
                        gboolean wps = bss_info->wps;
                        DBG("BSS found; SSID:%s security:%d WPS:%d", ssid, security, wps);
 
-                       if(bssid) {
+                       if (bssid) {
                                snprintf(bssid_str, sizeof(bssid_buf), MACSTR, MAC2STR(bssid));
                                DBG("BSSID: %s", bssid_str);
                        }
@@ -361,13 +361,13 @@ void wifi_ssid_scan_add_bss(GVariant *message)
                        gsize ie_len;
                        ie = g_variant_get_fixed_array(value, &ie_len, sizeof(guchar));
                        DBG("The IE : %s", ie);
-               } else if(g_strcmp0(key, "BSSID") == 0) {
+               } else if (g_strcmp0(key, "BSSID") == 0) {
                        const guchar *bssid;
                        gsize bssid_len;
 
                        bssid = g_variant_get_fixed_array(value, &bssid_len, sizeof(guchar));
-                       if(bssid != NULL && bssid_len == 6)
-                               memcpy(bss_info->bssid,bssid,bssid_len);
+                       if (bssid != NULL && bssid_len == 6)
+                               memcpy(bss_info->bssid, bssid, bssid_len);
                }
        }
 
index fbafbd9..95618f4 100755 (executable)
@@ -585,9 +585,8 @@ void wifi_state_set_service_state(wifi_service_state_e new_state)
 
        _wifi_state_changed(new_state);
 
-       if (new_state == NETCONFIG_WIFI_CONNECTED) {
+       if (new_state == NETCONFIG_WIFI_CONNECTED)
                _wifi_state_connected_activation();
-       }
 }
 
 wifi_service_state_e wifi_state_get_service_state(void)
index 618a2c6..544751e 100755 (executable)
@@ -400,15 +400,13 @@ static void __netconfig_wifi_interface_create_result(
                        __netconfig_wifi_wps_request_scan(path);
                        g_free(path);
                }
-       }
-       else if (NULL != strstr(error->message, ".InterfaceExists")) {
+       } else if (NULL != strstr(error->message, ".InterfaceExists")) {
                INFO("Error Message %s %s", error->message, path);
                g_variant_get(message, "(o)", &path);
                if (path) {
                        __netconfig_wifi_wps_request_scan(path);
                        g_free(path);
-               }
-               else
+               } else
                        __netconfig_wifi_wps_request_scan(NULL);
        } else {
                ERR("Failed to create interface, Error: %d[%s]", error->code, error->message);