diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-12-05 10:12:51 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-12-05 10:12:51 +0000 |
commit | 26a403def6da01067fdfaf173cf987ca409e2fca (patch) | |
tree | 23ff7cd72148b4f2d8adfe9cc7eed25039d24ed3 | |
parent | b7540bedf1d5e2e1ee1480acc776e01f66979f0f (diff) |
simplify
-rw-r--r-- | usr.sbin/user/main.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/usr.sbin/user/main.c b/usr.sbin/user/main.c index 3c81cb589db..989df01e94e 100644 --- a/usr.sbin/user/main.c +++ b/usr.sbin/user/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.4 2001/03/24 19:24:07 jakob Exp $ */ +/* $OpenBSD: main.c,v 1.5 2001/12/05 10:12:50 deraadt Exp $ */ /* $NetBSD: main.c,v 1.1 1999/12/24 09:08:50 agc Exp $ */ /* @@ -88,16 +88,15 @@ main(int argc, char **argv) for (matched = i = 0 ; i < cmdp->c_wc && i < MaxCmdWords ; i++) { if (argc > i) { if (strcmp((i == 0) ? __progname : argv[i], - cmdp->c_word[i]) == 0) { + cmdp->c_word[i]) == 0) { matched += 1; - } else { + } else break; - } } } - if (matched == cmdp->c_wc && cmdp->c_func != NULL) { - return (*cmdp->c_func)(argc - (matched - 1), argv + (matched - 1)); - } + if (matched == cmdp->c_wc && cmdp->c_func != NULL) + return (*cmdp->c_func)(argc - (matched - 1), + argv + (matched - 1)); } usermgmt_usage(__progname); /* NOTREACHED */ |