Module Name: src
Committed By: rillig
Date: Sat Aug 8 13:13:34 UTC 2020
Modified Files:
src/usr.bin/make: var.c
Log Message:
make(1): consistently use postfix-increment
To generate a diff of this commit:
cvs rdiff -u -r1.425 -r1.426 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.425 src/usr.bin/make/var.c:1.426
--- src/usr.bin/make/var.c:1.425 Sat Aug 8 13:05:24 2020
+++ src/usr.bin/make/var.c Sat Aug 8 13:13:34 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.425 2020/08/08 13:05:24 rillig Exp $ */
+/* $NetBSD: var.c,v 1.426 2020/08/08 13:13:34 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: var.c,v 1.425 2020/08/08 13:05:24 rillig Exp $";
+static char rcsid[] = "$NetBSD: var.c,v 1.426 2020/08/08 13:13:34 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.425 2020/08/08 13:05:24 rillig Exp $");
+__RCSID("$NetBSD: var.c,v 1.426 2020/08/08 13:13:34 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -1717,12 +1717,12 @@ ParseModifierPart(
int want = have == PROPEN ? PRCLOSE : BRCLOSE;
int depth = 1;
- for (p += 2; *p != '\0' && depth > 0; ++p) {
+ for (p += 2; *p != '\0' && depth > 0; p++) {
if (p[-1] != '\\') {
if (*p == have)
- ++depth;
+ depth++;
if (*p == want)
- --depth;
+ depth--;
}
}
Buf_AddBytesBetween(&buf, varstart, p);
@@ -2225,9 +2225,9 @@ ApplyModifier_Match(const char **pp, App
if (*p == '$')
needSubst = TRUE;
if (*p == '(' || *p == '{')
- ++nest;
+ nest++;
if (*p == ')' || *p == '}') {
- --nest;
+ nest--;
if (nest < 0)
break;
}