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/crontab.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'toys/pending/crontab.c') 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); -- cgit v1.2.3