From: millert Date: Mon, 3 Mar 1997 00:30:02 +0000 (+0000) Subject: Complain if invoked in a form that requires an argument and we didn't X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ce9b83ebf9daf122be8a2ef37dcf258548dc410e;p=openbsd Complain if invoked in a form that requires an argument and we didn't get one. --- diff --git a/usr.bin/at/at.c b/usr.bin/at/at.c index 8554027954b..d6003864d66 100644 --- a/usr.bin/at/at.c +++ b/usr.bin/at/at.c @@ -1,4 +1,4 @@ -/* $OpenBSD: at.c,v 1.8 1997/03/02 19:59:15 millert Exp $ */ +/* $OpenBSD: at.c,v 1.9 1997/03/03 00:30:02 millert Exp $ */ /* $NetBSD: at.c,v 1.4 1995/03/25 18:13:31 glass Exp $ */ /* @@ -73,7 +73,7 @@ enum { ATQ, ATRM, AT, BATCH, CAT }; /* what program we want to run */ /* File scope variables */ #ifndef lint -static char rcsid[] = "$OpenBSD: at.c,v 1.8 1997/03/02 19:59:15 millert Exp $"; +static char rcsid[] = "$OpenBSD: at.c,v 1.9 1997/03/03 00:30:02 millert Exp $"; #endif char *no_export[] = @@ -483,6 +483,9 @@ process_jobs(argc, argv, what) char queue; int jobno; + if (optind == argc && (what == ATRM || what == CAT)) + usage(); + PRIV_START if (chdir(_PATH_ATJOBS) != 0)