aboutsummaryrefslogtreecommitdiff
path: root/toys/pending/brctl.c
diff options
context:
space:
mode:
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);
}