Module Name:    src
Committed By:   rillig
Date:           Wed Feb  9 21:28:58 UTC 2022

Modified Files:
        src/usr.bin/make: meta.c parse.c

Log Message:
make: remove redundant conditions

A line starting with '======' is parsed as a variable assignment, with
an empty variable name and a value starting with '=====', making that
condition unreachable.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.197 -r1.198 src/usr.bin/make/meta.c
cvs rdiff -u -r1.665 -r1.666 src/usr.bin/make/parse.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.197 src/usr.bin/make/meta.c:1.198
--- src/usr.bin/make/meta.c:1.197	Tue Feb  8 22:36:02 2022
+++ src/usr.bin/make/meta.c	Wed Feb  9 21:28:57 2022
@@ -1,4 +1,4 @@
-/*      $NetBSD: meta.c,v 1.197 2022/02/08 22:36:02 sjg Exp $ */
+/*      $NetBSD: meta.c,v 1.198 2022/02/09 21:28:57 rillig Exp $ */
 
 /*
  * Implement 'meta' mode.
@@ -1160,8 +1160,7 @@ meta_oodate(GNode *gn, bool oodate)
 	/* we want to track all the .meta we read */
 	Global_Append(".MAKE.META.FILES", fname);
 
-	cmp_filter = metaCmpFilter ? metaCmpFilter :
-	    Var_Exists(gn, MAKE_META_CMP_FILTER);
+	cmp_filter = metaCmpFilter || Var_Exists(gn, MAKE_META_CMP_FILTER);
 
 	cmdNode = gn->commands.first;
 	while (!oodate && (x = fgetLine(&buf, &bufsz, 0, fp)) > 0) {

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.665 src/usr.bin/make/parse.c:1.666
--- src/usr.bin/make/parse.c:1.665	Wed Feb  9 21:09:24 2022
+++ src/usr.bin/make/parse.c	Wed Feb  9 21:28:57 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.665 2022/02/09 21:09:24 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.666 2022/02/09 21:28:57 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -106,7 +106,7 @@
 #include "pathnames.h"
 
 /*	"@(#)parse.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: parse.c,v 1.665 2022/02/09 21:09:24 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.666 2022/02/09 21:28:57 rillig Exp $");
 
 /*
  * A file being read.
@@ -847,7 +847,6 @@ static void
 InvalidLineType(const char *line)
 {
 	if (strncmp(line, "<<<<<<", 6) == 0 ||
-	    strncmp(line, "======", 6) == 0 ||
 	    strncmp(line, ">>>>>>", 6) == 0)
 		Parse_Error(PARSE_FATAL,
 		    "Makefile appears to contain unresolved CVS/RCS/??? merge conflicts");

Reply via email to