From: Jouni Malinen Date: Wed, 16 Mar 2016 19:19:19 +0000 (+0200) Subject: hs20-osu-client: Remove dead code from sub_rem command line parsing X-Git-Tag: hostap_2_6~716 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ec1eae849eec62c1cad7ca393c5fdff4518db033;p=thirdparty%2Fhostap.git hs20-osu-client: Remove dead code from sub_rem command line parsing The error print could not have been reached since the exact same condition was verified above and exit(0) is called if the command line is invalid. Signed-off-by: Jouni Malinen --- diff --git a/hs20/client/osu_client.c b/hs20/client/osu_client.c index 2907c6412..f79f59bbb 100644 --- a/hs20/client/osu_client.c +++ b/hs20/client/osu_client.c @@ -3133,14 +3133,9 @@ int main(int argc, char *argv[]) usage(); exit(0); } - if (argc - optind < 2) - wpa_printf(MSG_ERROR, "Server URL missing from command line"); - else - ret = cmd_sub_rem(&ctx, argv[optind + 1], - argc > optind + 2 ? - argv[optind + 2] : NULL, - argc > optind + 3 ? - argv[optind + 3] : NULL); + ret = cmd_sub_rem(&ctx, argv[optind + 1], + argc > optind + 2 ? argv[optind + 2] : NULL, + argc > optind + 3 ? argv[optind + 3] : NULL); } else if (strcmp(argv[optind], "pol_upd") == 0) { if (argc - optind < 2) { usage();