diff options
author | Rob Landley <rob@landley.net> | 2015-09-11 16:35:14 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2015-09-11 16:35:14 -0500 |
commit | e5354ca12a232b3f97726214254a868771cb70d1 (patch) | |
tree | ba373c24ede64b8a18f11a02cf834ce99aa586bf /toys/pending/crontab.c | |
parent | d067571abb2b7934f3350c90ca891beb987c68fd (diff) | |
download | toybox-e5354ca12a232b3f97726214254a868771cb70d1.tar.gz |
Replace toys.exithelp with help_exit() in lib.
Diffstat (limited to 'toys/pending/crontab.c')
-rw-r--r-- | toys/pending/crontab.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/toys/pending/crontab.c b/toys/pending/crontab.c index 05c98f2b..67c8a543 100644 --- a/toys/pending/crontab.c +++ b/toys/pending/crontab.c @@ -346,20 +346,15 @@ void crontab_main(void) if (!toys.optc) { if (!FLAG_elr) { - if (toys.optflags & FLAG_u) { - toys.exithelp++; - error_exit("file name must be specified for replace"); - } + if (toys.optflags & FLAG_u) + help_exit("file name must be specified for replace"); do_replace(pwd->pw_name); } else if (toys.optflags & FLAG_e) do_edit(pwd); else if (toys.optflags & FLAG_l) do_list(pwd->pw_name); else if (toys.optflags & FLAG_r) do_remove(pwd->pw_name); } else { - if (FLAG_elr) { - toys.exithelp++; - error_exit("no arguments permitted after this option"); - } + if (FLAG_elr) help_exit("no arguments permitted after this option"); do_replace(pwd->pw_name); } if (!(toys.optflags & FLAG_c)) free(TT.cdir); |