diff --git a/wpa_cli/src/wpa_cli_sample.c b/wpa_cli/src/wpa_cli_sample.c index a514d7a151f1f7ca00225542a727bcff0f30c85e..e0da7bc8a4b4f392cb348f57d21e60edf152e85f 100755 --- a/wpa_cli/src/wpa_cli_sample.c +++ b/wpa_cli/src/wpa_cli_sample.c @@ -151,23 +151,17 @@ static void TestNetworkConfig(void) char reply[100] = {0}; size_t replyLen = sizeof(reply); char cmd[200] = {0}; - int temp = 0; + int temp = 0; temp = sprintf_s(cmd, sizeof(cmd), "SET_NETWORK %.*s ssid \"example\"", networkIdLen, networkId); - if (temp != 0) { - printf("result is %d\n", temp); - }; + if (temp != 0) { printf("result is %d\n", temp); } ret += SendCtrlCommand(cmd, reply, &replyLen); replyLen = sizeof(reply); temp = sprintf_s(cmd, sizeof(cmd), "SET_NETWORK %.*s psk \"012345678\"", networkIdLen, networkId); - if (temp != 0) { - printf("result is %d\n", temp); - }; + if (temp != 0) { printf("result is %d\n", temp); } ret += SendCtrlCommand(cmd, reply, &replyLen); replyLen = sizeof(reply); temp = sprintf_s(cmd, sizeof(cmd), "ENABLE_NETWORK %.*s", networkIdLen, networkId); - if (temp != 0) { - printf("result is %d\n", temp); - }; + if (temp != 0) { printf("result is %d\n", temp); } ret += SendCtrlCommand(cmd, reply, &replyLen); replyLen = sizeof(reply); ret += SendCtrlCommand("RECONNECT", reply, &replyLen); @@ -177,9 +171,7 @@ static void TestNetworkConfig(void) return; } temp = sprintf_s(cmd, sizeof(cmd), "REMOVE_NETWORK %.*s", networkIdLen, networkId); - if (temp != 0) { - printf("result is %d\n", temp); - }; + if (temp != 0) { printf("result is %d\n", temp); } SendCtrlCommand(cmd, reply, &replyLen); SAMPLE_ERROR("network config failed remove network [%.*s].", networkIdLen, networkId); }