aboutsummaryrefslogtreecommitdiff
path: root/toys/pending/brctl.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2015-09-11 16:35:14 -0500
committerRob Landley <rob@landley.net>2015-09-11 16:35:14 -0500
commite5354ca12a232b3f97726214254a868771cb70d1 (patch)
treeba373c24ede64b8a18f11a02cf834ce99aa586bf /toys/pending/brctl.c
parentd067571abb2b7934f3350c90ca891beb987c68fd (diff)
downloadtoybox-e5354ca12a232b3f97726214254a868771cb70d1.tar.gz
Replace toys.exithelp with help_exit() in lib.
Diffstat (limited to 'toys/pending/brctl.c')
-rw-r--r--toys/pending/brctl.c10
1 files changed, 2 insertions, 8 deletions
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);
}