diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2019-12-30 11:01:17 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2019-12-30 11:01:17 +0000 |
commit | c35ed7b92c5229b03ce110c96db914ce7d736fb0 (patch) | |
tree | 537bb86872d57b8291ba4053732b3f1a4a188c93 /usr.bin | |
parent | 3e2b5552e1514bde9312469478dc5dd6557c1449 (diff) |
7 years later, I think the commit message was not enough.
document this rather intricate loop (only comments no code change)
Diffstat (limited to 'usr.bin')
-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; } |