diff options
author | 2019-12-30 11:01:16 +0000 | |
---|---|---|
committer | 2019-12-30 11:01:16 +0000 | |
commit | d281342869dcfbb9afe060691c17e9235b0df9e5 (patch) | |
tree | 809cf88103181b45e738cfc7067fec3d4cf1c010 | |
parent | convert infinite msleep(9) to msleep_nsec(9) (diff) | |
download | wireguard-openbsd-d281342869dcfbb9afe060691c17e9235b0df9e5.tar.xz wireguard-openbsd-d281342869dcfbb9afe060691c17e9235b0df9e5.zip |
7 years later, I think the commit message was not enough.
document this rather intricate loop (only comments no code change)
-rw-r--r-- | usr.bin/make/job.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c index e460a08764d..b6a28fb40a7 100644 --- a/usr.bin/make/job.c +++ b/usr.bin/make/job.c @@ -1,4 +1,4 @@ -/* $OpenBSD: job.c,v 1.142 2019/12/25 20:42:04 espie Exp $ */ +/* $OpenBSD: job.c,v 1.143 2019/12/30 11:01:16 espie Exp $ */ /* $NetBSD: job.c,v 1.16 1996/11/06 17:59:08 christos Exp $ */ /* @@ -322,14 +322,18 @@ internal_print_errors() dying = check_dying_signal(); if (dying) quick_summary(dying); + /* Print errors grouped by file name. */ while (errorJobs != NULL) { + /* Select the first job. */ k = errorJobs; errorJobs = NULL; for (j = k; j != NULL; j = jnext) { jnext = j->next; if (j->location->fname == k->location->fname) + /* Print errors with the same filename. */ print_error(j); else { + /* Keep others for the next iteration. */ j->next = errorJobs; errorJobs = j; } |