diff options
author | Rob Landley <rob@landley.net> | 2015-09-11 16:35:14 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2015-09-11 16:35:14 -0500 |
commit | e5354ca12a232b3f97726214254a868771cb70d1 (patch) | |
tree | ba373c24ede64b8a18f11a02cf834ce99aa586bf /toys/other/ifconfig.c | |
parent | d067571abb2b7934f3350c90ca891beb987c68fd (diff) | |
download | toybox-e5354ca12a232b3f97726214254a868771cb70d1.tar.gz |
Replace toys.exithelp with help_exit() in lib.
Diffstat (limited to 'toys/other/ifconfig.c')
-rw-r--r-- | toys/other/ifconfig.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/toys/other/ifconfig.c b/toys/other/ifconfig.c index 948043e2..bfd9a306 100644 --- a/toys/other/ifconfig.c +++ b/toys/other/ifconfig.c @@ -403,10 +403,7 @@ void ifconfig_main(void) p = ptr = toybuf; } } - if (!sock->sa_family || !argv[1]) { - toys.exithelp++; - error_exit("bad hw '%s'", *argv); - } + if (!sock->sa_family || !argv[1]) help_exit("bad hw '%s'", *argv); hw_addr = *++argv; // Parse and verify address. @@ -447,10 +444,7 @@ void ifconfig_main(void) } ifre6; int plen, fd6 = xsocket(AF_INET6, SOCK_DGRAM, 0); - if (!argv[1]) { - toys.exithelp++; - error_exit("%s", *argv); - } + if (!argv[1]) help_exit("%s", *argv); plen = get_addrinfo(argv[1], AF_INET6, &ifre6.addr); if (plen < 0) plen = 128; @@ -517,10 +511,7 @@ void ifconfig_main(void) break; } - if (i == sizeof(try)/sizeof(*try)) { - toys.exithelp++; - error_exit("bad argument '%s'", *argv); - } + if (i == sizeof(try)/sizeof(*try)) help_exit("bad argument '%s'", *argv); } close(TT.sockfd); } |