From e5354ca12a232b3f97726214254a868771cb70d1 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Fri, 11 Sep 2015 16:35:14 -0500 Subject: Replace toys.exithelp with help_exit() in lib. --- toys/pending/brctl.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'toys/pending/brctl.c') diff --git a/toys/pending/brctl.c b/toys/pending/brctl.c index e3b1526c..60178518 100644 --- a/toys/pending/brctl.c +++ b/toys/pending/brctl.c @@ -320,20 +320,14 @@ void brctl_main(void) if (strcmp(t->cmd, *toys.optargs)) continue; toys.optargs++, toys.optc--; - if (toys.optc < t->nargs) { - toys.exithelp++; - error_exit("check args"); - } + if (toys.optc < t->nargs) help_exit("check args"); t->f(toys.optargs); toys.optargs += t->nargs; toys.optc -= t->nargs; break; } - if (i == ARRAY_LEN(cc)) { - toys.exithelp++; - error_exit("invalid option '%s'", *toys.optargs); - } + if (i == ARRAY_LEN(cc)) help_exit("invalid option '%s'", *toys.optargs); } xclose(TT.sockfd); } -- cgit v1.2.3