diff options
Diffstat (limited to 'usr.bin/at/at.c')
-rw-r--r-- | usr.bin/at/at.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.bin/at/at.c b/usr.bin/at/at.c index a8816599734..689d1c8cc80 100644 --- a/usr.bin/at/at.c +++ b/usr.bin/at/at.c @@ -1,4 +1,4 @@ -/* $OpenBSD: at.c,v 1.40 2003/09/26 21:26:40 tedu Exp $ */ +/* $OpenBSD: at.c,v 1.41 2004/06/03 19:19:07 millert Exp $ */ /* * at.c : Put file into atrun queue @@ -42,7 +42,7 @@ #define TIMESIZE 50 /* Size of buffer passed to strftime() */ #ifndef lint -static const char rcsid[] = "$OpenBSD: at.c,v 1.40 2003/09/26 21:26:40 tedu Exp $"; +static const char rcsid[] = "$OpenBSD: at.c,v 1.41 2004/06/03 19:19:07 millert Exp $"; #endif /* Variables to remove from the job's environment. */ @@ -71,7 +71,7 @@ static int check_permission(void); static void panic(const char *); static void perr(const char *); static void perr2(const char *, const char *); -static void usage(void); +static __dead void usage(void); time_t parsetime(int, char **); /* @@ -878,7 +878,7 @@ check_permission(void) return (ok); } -static void +static __dead void usage(void) { /* Print usage and exit. */ @@ -921,6 +921,9 @@ main(int argc, char **argv) int cflag = 0; int nflag = 0; + if (argc < 1) + usage(); + if ((ProgramName = strrchr(argv[0], '/')) != NULL) ProgramName++; else |