summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2003-03-03 18:23:14 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2003-03-03 18:23:14 +0000
commitcac9cafd17b82786a0d97f442be44b56bc371564 (patch)
treee895aad743d3fb512bb1627a5a208212fb9c1f26 /usr.bin
parent47006bac8d410d6e4ef6c3fa371efc0cccfde675 (diff)
Add back fix from 1.32 that was lost in latest sync
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/at/at.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/at/at.c b/usr.bin/at/at.c
index 13e026e2afd..a9c2ed911bb 100644
--- a/usr.bin/at/at.c
+++ b/usr.bin/at/at.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: at.c,v 1.35 2003/02/20 20:38:08 millert Exp $ */
+/* $OpenBSD: at.c,v 1.36 2003/03/03 18:23:13 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.35 2003/02/20 20:38:08 millert Exp $";
+static const char rcsid[] = "$OpenBSD: at.c,v 1.36 2003/03/03 18:23:13 millert Exp $";
#endif
/* Variables to remove from the job's environment. */
@@ -701,7 +701,8 @@ process_jobs(int argc, char **argv, int what)
job_matches = (argc == 0) ? 1 : 0;
if (!job_matches) {
for (i = 0; i < jobs_len; i++) {
- if (strcmp(dirent->d_name, jobs[i]) == 0) {
+ if (jobs[i] != NULL &&
+ strcmp(dirent->d_name, jobs[i]) == 0) {
jobs[i] = NULL;
job_matches = 1;
break;