Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/make make(1): fix wrong assertion in ApplyModifiers



details:   https://anonhg.NetBSD.org/src/rev/4af9968f9e5b
branches:  trunk
changeset: 936782:4af9968f9e5b
user:      rillig <rillig%NetBSD.org@localhost>
date:      Mon Aug 03 21:44:43 2020 +0000

description:
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.

diffstat:

 usr.bin/make/var.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (35 lines):

diff -r 631ce26a31ce -r 4af9968f9e5b usr.bin/make/var.c
--- a/usr.bin/make/var.c        Mon Aug 03 21:12:29 2020 +0000
+++ b/usr.bin/make/var.c        Mon Aug 03 21:44:43 2020 +0000
@@ -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 @@
     ApplyModifierResult res;
 
     assert(startc == '(' || startc == '{' || startc == '\0');
-    assert(endc == ')' || endc == '}' || startc == '\0');
+    assert(endc == ')' || endc == '}' || endc == '\0');
 
     p = *pp;
     while (*p != '\0' && *p != endc) {



Home | Main Index | Thread Index | Old Index