Module Name: src Committed By: rillig Date: Fri Aug 28 06:47:15 UTC 2020
Modified Files: src/usr.bin/make: meta.c Log Message: make(1): fix the other assertion from Lst_FindFrom When I migrated the Lst_FindFrom to the strict API variant, I forgot that Lst_FindFrom requires both arguments (list and node) to be non-null. I had only checked that the list is non-null. There are only very few calls to Lst_FindFrom, and they are all ok now. To generate a diff of this commit: cvs rdiff -u -r1.106 -r1.107 src/usr.bin/make/meta.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/make/meta.c diff -u src/usr.bin/make/meta.c:1.106 src/usr.bin/make/meta.c:1.107 --- src/usr.bin/make/meta.c:1.106 Fri Aug 28 04:48:57 2020 +++ src/usr.bin/make/meta.c Fri Aug 28 06:47:14 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: meta.c,v 1.106 2020/08/28 04:48:57 rillig Exp $ */ +/* $NetBSD: meta.c,v 1.107 2020/08/28 06:47:14 rillig Exp $ */ /* * Implement 'meta' mode. @@ -1340,8 +1340,11 @@ meta_oodate(GNode *gn, Boolean oodate) char *tp; do { - nln = Lst_FindFrom(missingFiles, Lst_Succ(ln), - path_match, p); + LstNode succ = Lst_Succ(ln); + nln = succ != NULL + ? Lst_FindFrom(missingFiles, succ, + path_match, p) + : NULL; tp = Lst_Datum(ln); Lst_Remove(missingFiles, ln); free(tp);