From 5a73f3992d75dd4c7beefae2fa8a843d14372b19 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 22 Dec 2013 20:15:54 -0600 Subject: Ashwini sharma pointed out that show_help() doesn't exit so "ifconfig eth0 netmask" would segfault. Replace it with an error_exit(), see list for aesthetic issue this raises re: help text. --- toys/other/ifconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toys/other/ifconfig.c b/toys/other/ifconfig.c index 38d2f64b..59d1574d 100644 --- a/toys/other/ifconfig.c +++ b/toys/other/ifconfig.c @@ -478,7 +478,7 @@ void ifconfig_main(void) // Is this an SIOCSI entry? if ((off|0xff) == 0x89ff) { if (!rev) { - if (!*++argv) show_help(); + if (!*++argv) error_exit("%s needs argument", t->name); // Assign value to ifre field and call ioctl? (via IFREQ_OFFSZ.) if (on < 0) { -- cgit v1.2.3