Module Name: src
Committed By: rillig
Date: Mon Nov 16 18:28:27 UTC 2020
Modified Files:
src/usr.bin/make: job.c main.c str.c
Log Message:
make(1): use postfix increment where possible
To generate a diff of this commit:
cvs rdiff -u -r1.325 -r1.326 src/usr.bin/make/job.c
cvs rdiff -u -r1.474 -r1.475 src/usr.bin/make/main.c
cvs rdiff -u -r1.73 -r1.74 src/usr.bin/make/str.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/job.c
diff -u src/usr.bin/make/job.c:1.325 src/usr.bin/make/job.c:1.326
--- src/usr.bin/make/job.c:1.325 Sat Nov 14 17:04:01 2020
+++ src/usr.bin/make/job.c Mon Nov 16 18:28:27 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: job.c,v 1.325 2020/11/14 17:04:01 rillig Exp $ */
+/* $NetBSD: job.c,v 1.326 2020/11/16 18:28:27 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -143,7 +143,7 @@
#include "trace.h"
/* "@(#)job.c 8.2 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: job.c,v 1.325 2020/11/14 17:04:01 rillig Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.326 2020/11/16 18:28:27 rillig Exp $");
/* A shell defines how the commands are run. All commands for a target are
* written into a single file, which is then given to the shell to execute
@@ -1964,7 +1964,7 @@ Job_CatchOutput(void)
default:
abort();
}
- --nready;
+ nready--;
}
Job_CatchChildren();
Index: src/usr.bin/make/main.c
diff -u src/usr.bin/make/main.c:1.474 src/usr.bin/make/main.c:1.475
--- src/usr.bin/make/main.c:1.474 Sun Nov 15 09:54:16 2020
+++ src/usr.bin/make/main.c Mon Nov 16 18:28:27 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.474 2020/11/15 09:54:16 rillig Exp $ */
+/* $NetBSD: main.c,v 1.475 2020/11/16 18:28:27 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -109,7 +109,7 @@
#include "trace.h"
/* "@(#)main.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: main.c,v 1.474 2020/11/15 09:54:16 rillig Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.475 2020/11/16 18:28:27 rillig Exp $");
#if defined(MAKE_NATIVE) && !defined(lint)
__COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
"The Regents of the University of California. "
@@ -276,13 +276,13 @@ parse_debug_options(const char *argvalue
case 'g':
if (modules[1] == '1') {
debug |= DEBUG_GRAPH1;
- ++modules;
+ modules++;
} else if (modules[1] == '2') {
debug |= DEBUG_GRAPH2;
- ++modules;
+ modules++;
} else if (modules[1] == '3') {
debug |= DEBUG_GRAPH3;
- ++modules;
+ modules++;
}
break;
case 'h':
@@ -607,8 +607,8 @@ rearg:
arginc = 0;
if (inOption) {
if (c == '\0') {
- ++argv;
- --argc;
+ argv++;
+ argc--;
inOption = FALSE;
continue;
}
Index: src/usr.bin/make/str.c
diff -u src/usr.bin/make/str.c:1.73 src/usr.bin/make/str.c:1.74
--- src/usr.bin/make/str.c:1.73 Sun Nov 15 12:02:44 2020
+++ src/usr.bin/make/str.c Mon Nov 16 18:28:27 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: str.c,v 1.73 2020/11/15 12:02:44 rillig Exp $ */
+/* $NetBSD: str.c,v 1.74 2020/11/16 18:28:27 rillig Exp $ */
/*-
* Copyright (c) 1988, 1989, 1990, 1993
@@ -71,7 +71,7 @@
#include "make.h"
/* "@(#)str.c 5.8 (Berkeley) 6/1/90" */
-MAKE_RCSID("$NetBSD: str.c,v 1.73 2020/11/15 12:02:44 rillig Exp $");
+MAKE_RCSID("$NetBSD: str.c,v 1.74 2020/11/16 18:28:27 rillig Exp $");
/* Return the concatenation of s1 and s2, freshly allocated. */
char *
@@ -236,7 +236,7 @@ Str_Words(const char *str, Boolean expan
case '\n':
/* hmmm; fix it up as best we can */
ch = '\\';
- --str_p;
+ str_p--;
break;
case 'b':
ch = '\b';