From: Segwon Date: Mon, 11 Sep 2017 10:32:20 +0000 (+0900) Subject: Coding Rule check X-Git-Tag: submit/tizen/20170911.104418^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen;p=platform%2Fcore%2Fconvergence%2Fapp-comm-svc.git Coding Rule check Signed-off-by: Segwon Change-Id: Icb98c39be75edaf4683b76c6608ed57b966acddf --- diff --git a/PinCodeService/IPCServer.cpp b/PinCodeService/IPCServer.cpp index bd72c0f..c3e2903 100755 --- a/PinCodeService/IPCServer.cpp +++ b/PinCodeService/IPCServer.cpp @@ -566,8 +566,7 @@ void IPCServer::ConvertCapitalMac(char *sMac) { int i = 0; if (strlen(sMac) != MAC_ADDR_STR_LEN - 1) { - } - else { + } else { for (i = 0; i < MAC_ADDR_STR_LEN; i++) { if (sMac[i] >= 'a' && sMac[i] <= 'z') sMac[i] = sMac[i] - 0x20; diff --git a/main.cpp b/main.cpp index 01964d5..194c160 100755 --- a/main.cpp +++ b/main.cpp @@ -113,30 +113,21 @@ static void CheckWifiSecurityEncryption(connection_h connection_info) return; } - if(connection_profile_get_wifi_security_type(connection_profile, &connection_wifi_security_type) != CONNECTION_ERROR_NONE) - { + if(connection_profile_get_wifi_security_type(connection_profile, &connection_wifi_security_type) != CONNECTION_ERROR_NONE) { REMOTE_PRINT_DEBUG("Failed to get Wifi Security Type"); - } - else if (connection_profile_get_wifi_encryption_type(connection_profile, &connection_wifi_encryption_type) != CONNECTION_ERROR_NONE) - { + } else if (connection_profile_get_wifi_encryption_type(connection_profile, &connection_wifi_encryption_type) != CONNECTION_ERROR_NONE) { REMOTE_PRINT_DEBUG("Failed to get Wifi Encryption Type"); - } - else if ( (connection_wifi_security_type == CONNECTION_WIFI_SECURITY_TYPE_WPA_PSK) & - ( (connection_wifi_encryption_type == CONNECTION_WIFI_ENCRYPTION_TYPE_AES) || (connection_wifi_encryption_type == CONNECTION_WIFI_ENCRYPTION_TYPE_TKIP_AES_MIXED))) - { + } else if ( (connection_wifi_security_type == CONNECTION_WIFI_SECURITY_TYPE_WPA_PSK) & + ( (connection_wifi_encryption_type == CONNECTION_WIFI_ENCRYPTION_TYPE_AES) || (connection_wifi_encryption_type == CONNECTION_WIFI_ENCRYPTION_TYPE_TKIP_AES_MIXED))) { //Check_Result = 0; REMOTE_PRINT_DEBUG("Wifi Check for Omission is OK"); //pCMInstance->SetACLOmissionResult(Check_Result); return; - } - else - { + } else { REMOTE_PRINT_DEBUG("Not Allow Ommission Of Access Popup : Because of Security type & Encryption type"); } } - } - else - { + } else { REMOTE_PRINT_DEBUG("Failed to get Connection Type"); } //pCMInstance->SetACLOmissionResult(Check_Result); @@ -167,15 +158,12 @@ void getTvName_cb(keynode_t *key, void* data) void NetworkIPChanged_cb(const char* ipv4_address, const char* ipv6_address, void* user_data) { - if(ipv4_address != 0 && (strlen(ipv4_address) > 7)) - { + if (ipv4_address != 0 && (strlen(ipv4_address) > 7)) { REMOTE_PRINT_DEBUG("UpdateMITNode request, IP_address : [%s]", ipv4_address); ipc_server->UpdateMITNode(); //update Node Server when IP is changed. CheckWifiSecurityEncryption(user_data); - } - else - { + } else { REMOTE_PRINT_DEBUG("There is no IP address"); //pCMInstance->SetACLOmissionResult(1); //Check WIFI for omission is 'Not OK'(1) } @@ -190,19 +178,15 @@ int main(void) vconf_notify_key_changed("db/menu/network/devicename/tv_name", getTvName_cb, NULL); - if(mainloop != NULL) - { + if(mainloop != NULL) { connection_h connection = NULL; int ret = -1; ret = connection_create(&connection); - if(ret == CONNECTION_ERROR_NONE) - { + if (ret == CONNECTION_ERROR_NONE) { // connection_set_type_changed_cb(connection, NetworkTypeChanged_cb, NULL); CheckWifiSecurityEncryption(connection); connection_set_ip_address_changed_cb(connection, NetworkIPChanged_cb, connection); - } - else - { + } else { REMOTE_PRINT_DEBUG("Fail to create connection_set_type_changed_cb\n"); } //REMOTE_PRINT_DEBUG("Start Convergence Manager!"); @@ -221,9 +205,7 @@ int main(void) g_main_loop_run(mainloop); g_main_loop_unref(mainloop); connection_destroy(connection); - } - else - { + } else { REMOTE_PRINT_WARN("Fail to start Convergence Manager!"); }