Module Name: src
Committed By: rillig
Date: Sun Oct 25 16:18:02 UTC 2020
Modified Files:
src/usr.bin/make: for.c
Log Message:
make(1): clean up comments in .for handling
To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/usr.bin/make/for.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/for.c
diff -u src/usr.bin/make/for.c:1.107 src/usr.bin/make/for.c:1.108
--- src/usr.bin/make/for.c:1.107 Sun Oct 25 16:15:48 2020
+++ src/usr.bin/make/for.c Sun Oct 25 16:18:02 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: for.c,v 1.107 2020/10/25 16:15:48 rillig Exp $ */
+/* $NetBSD: for.c,v 1.108 2020/10/25 16:18:02 rillig Exp $ */
/*
* Copyright (c) 1992, The Regents of the University of California.
@@ -60,7 +60,7 @@
#include "make.h"
/* "@(#)for.c 8.1 (Berkeley) 6/6/93" */
-MAKE_RCSID("$NetBSD: for.c,v 1.107 2020/10/25 16:15:48 rillig Exp $");
+MAKE_RCSID("$NetBSD: for.c,v 1.108 2020/10/25 16:18:02 rillig Exp $");
/* The .for loop substitutes the items as ${:U<value>...}, which means
* that characters that break this syntax must be backslash-escaped. */
@@ -178,14 +178,9 @@ For_Eval(const char *line)
For *new_for;
const char *p;
- /* Skip the '.' and any following whitespace */
- p = line + 1;
+ p = line + 1; /* skip the '.' */
cpp_skip_whitespace(&p);
- /*
- * If we are not in a for loop quickly determine if the statement is
- * a for.
- */
if (!IsFor(p)) {
if (IsEndfor(p)) {
Parse_Error(PARSE_FATAL, "for-less endfor");