Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make Use Lst_FindFrom and Lst_Succ(ln) to find next ...



details:   https://anonhg.NetBSD.org/src/rev/4cf9bd2a38da
branches:  trunk
changeset: 347013:4cf9bd2a38da
user:      sjg <sjg%NetBSD.org@localhost>
date:      Wed Aug 10 18:49:40 2016 +0000

description:
Use Lst_FindFrom and Lst_Succ(ln) to find next entry in missingFiles.

diffstat:

 usr.bin/make/meta.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 5c7edaa8da9f -r 4cf9bd2a38da usr.bin/make/meta.c
--- a/usr.bin/make/meta.c       Wed Aug 10 18:44:50 2016 +0000
+++ b/usr.bin/make/meta.c       Wed Aug 10 18:49:40 2016 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: meta.c,v 1.64 2016/08/10 18:25:00 sjg Exp $ */
+/*      $NetBSD: meta.c,v 1.65 2016/08/10 18:49:40 sjg Exp $ */
 
 /*
  * Implement 'meta' mode.
@@ -1196,14 +1196,16 @@
                        /* remove any missingFiles entries that match p */
                        if ((ln = Lst_Find(missingFiles, p,
                                           path_match)) != NULL) {
+                           LstNode nln;
                            char *tp;
 
                            do {
+                               nln = Lst_FindFrom(missingFiles, Lst_Succ(ln),
+                                                  p, path_match);
                                tp = Lst_Datum(ln);
                                Lst_Remove(missingFiles, ln);
                                free(tp);
-                           } while ((ln = Lst_Find(missingFiles, p,
-                                                   path_match)) != NULL);
+                           } while ((ln = nln) != NULL);
                        }
                    }
                    if (buf[0] == 'M') {



Home | Main Index | Thread Index | Old Index