Module Name: src
Committed By: rillig
Date: Mon Aug 3 21:44:43 UTC 2020
Modified Files:
src/usr.bin/make: var.c
Log Message:
make(1): fix wrong assertion in ApplyModifiers
The assertion was supposed to validate startc and endc individually.
For unknown reasons (once again), this reduces the code size by 49 bytes
on x86_64.
To generate a diff of this commit:
cvs rdiff -u -r1.412 -r1.413 src/usr.bin/make/var.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/var.c
diff -u src/usr.bin/make/var.c:1.412 src/usr.bin/make/var.c:1.413
--- src/usr.bin/make/var.c:1.412 Mon Aug 3 20:26:09 2020
+++ src/usr.bin/make/var.c Mon Aug 3 21:44:43 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.412 2020/08/03 20:26:09 rillig Exp $ */
+/* $NetBSD: var.c,v 1.413 2020/08/03 21:44:43 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: var.c,v 1.412 2020/08/03 20:26:09 rillig Exp $";
+static char rcsid[] = "$NetBSD: var.c,v 1.413 2020/08/03 21:44:43 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: var.c,v 1.412 2020/08/03 20:26:09 rillig Exp $");
+__RCSID("$NetBSD: var.c,v 1.413 2020/08/03 21:44:43 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -3045,7 +3045,7 @@ ApplyModifiers(
ApplyModifierResult res;
assert(startc == '(' || startc == '{' || startc == '\0');
- assert(endc == ')' || endc == '}' || startc == '\0');
+ assert(endc == ')' || endc == '}' || endc == '\0');
p = *pp;
while (*p != '\0' && *p != endc) {