make(1): consistently use postfix-increment
This commit is contained in:
parent
f609a55b29
commit
186e0c68e8
|
@ -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, ApplyModifiersState *st)
|
|||
if (*p == '$')
|
||||
needSubst = TRUE;
|
||||
if (*p == '(' || *p == '{')
|
||||
++nest;
|
||||
nest++;
|
||||
if (*p == ')' || *p == '}') {
|
||||
--nest;
|
||||
nest--;
|
||||
if (nest < 0)
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue