summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2019-12-25 20:42:04 +0000
committerespie <espie@openbsd.org>2019-12-25 20:42:04 +0000
commit4b157101db5212ca471a7b048bdae1b17411682f (patch)
tree73f69f6173b5ced237fb601b621cd6f3699db141
parentdisable a few more things which might look in /usr/local. (diff)
downloadwireguard-openbsd-4b157101db5212ca471a7b048bdae1b17411682f.tar.xz
wireguard-openbsd-4b157101db5212ca471a7b048bdae1b17411682f.zip
exit_type is already set up with exactly the information we need,
so get rid of cluttered duplicate logic okay kn@
-rw-r--r--usr.bin/make/job.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c
index 2158c5c59e1..e460a08764d 100644
--- a/usr.bin/make/job.c
+++ b/usr.bin/make/job.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: job.c,v 1.141 2019/12/21 15:28:17 espie Exp $ */
+/* $OpenBSD: job.c,v 1.142 2019/12/25 20:42:04 espie Exp $ */
/* $NetBSD: job.c,v 1.16 1996/11/06 17:59:08 christos Exp $ */
/*
@@ -140,10 +140,10 @@ static sigset_t sigset, emptyset;
static void handle_fatal_signal(int);
static void handle_siginfo(void);
-static void postprocess_job(Job *, bool);
+static void postprocess_job(Job *);
static Job *prepare_job(GNode *);
static void determine_job_next_step(Job *);
-static void remove_job(Job *, bool);
+static void remove_job(Job *);
static void may_continue_job(Job *);
static void continue_job(Job *);
static Job *reap_finished_job(pid_t);
@@ -528,9 +528,9 @@ debug_kill_printf(const char *fmt, ...)
/*ARGSUSED*/
static void
-postprocess_job(Job *job, bool okay)
+postprocess_job(Job *job)
{
- if (okay &&
+ if (job->exit_type == JOB_EXIT_OKAY &&
aborting != ABORT_ERROR &&
aborting != ABORT_INTERRUPT) {
/* As long as we aren't aborting and the job didn't return a
@@ -690,7 +690,7 @@ continue_job(Job *job)
{
bool finished = job_run_next(job);
if (finished)
- remove_job(job, true);
+ remove_job(job);
else
determine_expensive_job(job);
}
@@ -731,18 +731,17 @@ determine_job_next_step(Job *job)
job->node->name);
}
- okay = job->exit_type == JOB_EXIT_OKAY;
- if (!okay || job->next_cmd == NULL)
- remove_job(job, okay);
+ if (job->exit_type != JOB_EXIT_OKAY || job->next_cmd == NULL)
+ remove_job(job);
else
may_continue_job(job);
}
static void
-remove_job(Job *job, bool okay)
+remove_job(Job *job)
{
nJobs--;
- postprocess_job(job, okay);
+ postprocess_job(job);
while (!no_new_jobs) {
if (heldJobs != NULL) {
job = heldJobs;