diff options
author | Marc Espie <espie@cvs.openbsd.org> | 1999-12-18 21:56:08 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 1999-12-18 21:56:08 +0000 |
commit | 1054102ac1e5da024bb0316738d7cef7f996d28b (patch) | |
tree | 9c44d109f83a08cfeda71f32710eeff5a752bef9 /usr.bin/make/job.c | |
parent | 55cf72374a6a0695c5f50929233d06baccf648f7 (diff) |
Lst_DeQueue already checks for empty lists.
Diffstat (limited to 'usr.bin/make/job.c')
-rw-r--r-- | usr.bin/make/job.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c index 7362f787d00..5a2d118fadb 100644 --- a/usr.bin/make/job.c +++ b/usr.bin/make/job.c @@ -1,4 +1,4 @@ -/* $OpenBSD: job.c,v 1.18 1999/12/18 21:53:32 espie Exp $ */ +/* $OpenBSD: job.c,v 1.19 1999/12/18 21:56:07 espie Exp $ */ /* $NetBSD: job.c,v 1.16 1996/11/06 17:59:08 christos Exp $ */ /* @@ -43,7 +43,7 @@ #if 0 static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94"; #else -static char rcsid[] = "$OpenBSD: job.c,v 1.18 1999/12/18 21:53:32 espie Exp $"; +static char rcsid[] = "$OpenBSD: job.c,v 1.19 1999/12/18 21:56:07 espie Exp $"; #endif #endif /* not lint */ @@ -3148,12 +3148,14 @@ JobFlagForMigration(hostID) static void JobRestartJobs() { - while (!jobFull && !Lst_IsEmpty(stoppedJobs)) { + Job *job; + + while (!jobFull && (job = (Job *)Lst_DeQueue(stoppedJobs)) != NULL) { if (DEBUG(JOB)) { (void) fprintf(stdout, "Job queue is not full. Restarting a stopped job.\n"); (void) fflush(stdout); } - JobRestart((Job *)Lst_DeQueue(stoppedJobs)); + JobRestart(job); } } |