Module Name:    othersrc
Committed By:   dholland
Date:           Tue Mar  5 04:31:27 UTC 2013

Modified Files:
        othersrc/usr.bin/dholland-make2: main.c

Log Message:
Simplify twisted logic of "ReadAllMakefiles".


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 othersrc/usr.bin/dholland-make2/main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: othersrc/usr.bin/dholland-make2/main.c
diff -u othersrc/usr.bin/dholland-make2/main.c:1.7 othersrc/usr.bin/dholland-make2/main.c:1.8
--- othersrc/usr.bin/dholland-make2/main.c:1.7	Tue Mar  5 04:27:27 2013
+++ othersrc/usr.bin/dholland-make2/main.c	Tue Mar  5 04:31:27 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.7 2013/03/05 04:27:27 dholland Exp $	*/
+/*	$NetBSD: main.c,v 1.8 2013/03/05 04:31:27 dholland Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -128,7 +128,7 @@
 
 MAKE_COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993\
  The Regents of the University of California.  All rights reserved.");
-MAKE_RCSID("$NetBSD: main.c,v 1.7 2013/03/05 04:27:27 dholland Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.8 2013/03/05 04:31:27 dholland Exp $");
 
 
 #ifndef	DEFMAXLOCAL
@@ -667,19 +667,6 @@ Main_SetObjdir(const char *path)
 	return rc;
 }
 
-/*-
- * ReadAllMakefiles --
- *	wrapper around ReadMakefile() to read all.
- *
- * Results:
- *	TRUE if ok, FALSE on error
- */
-static int
-ReadAllMakefiles(const void *p, const void *q)
-{
-	return (ReadMakefile(p, q) == 0);
-}
-
 int
 str2Lst_Append(struct stringarray *lp, char *str, const char *sep)
 {
@@ -1133,7 +1120,7 @@ main(int argc, char **argv)
 
 		for (i=0; i<stringarray_num(&makefiles); i++) {
 		    mf = stringarray_get(&makefiles, i);
-		    if (ReadAllMakefiles(mf, NULL) == 0) {
+		    if (ReadMakefile(mf, NULL) != 0) {
 			Fatal("%s: cannot open %s.", progname, mf);
 			break;
 		    }

Reply via email to