summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2007-09-17 08:36:58 +0000
committerMarc Espie <espie@cvs.openbsd.org>2007-09-17 08:36:58 +0000
commit2b46902affaaa428e689d38c6456f3f1096496f6 (patch)
treee2a4f0abfd4f24d39e7749f2fc4aa64d7f84ca86 /usr.bin
parente2265c677eef539f951f3bc828f691a00257219e (diff)
kill += 1, -= 1 -> ++, --
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/make/compat.c4
-rw-r--r--usr.bin/make/cond.c10
-rw-r--r--usr.bin/make/engine.c4
-rw-r--r--usr.bin/make/job.c20
-rw-r--r--usr.bin/make/make.c4
-rw-r--r--usr.bin/make/parse.c4
-rw-r--r--usr.bin/make/suff.c8
-rw-r--r--usr.bin/make/util.c4
8 files changed, 29 insertions, 29 deletions
diff --git a/usr.bin/make/compat.c b/usr.bin/make/compat.c
index ca3e5be55ed..8a6022fb73f 100644
--- a/usr.bin/make/compat.c
+++ b/usr.bin/make/compat.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: compat.c,v 1.57 2007/09/16 14:18:40 espie Exp $ */
+/* $OpenBSD: compat.c,v 1.58 2007/09/17 08:36:57 espie Exp $ */
/* $NetBSD: compat.c,v 1.14 1996/11/06 17:59:01 christos Exp $ */
/*
@@ -573,7 +573,7 @@ Compat_Run(Lst targs) /* List of target nodes to re-create */
else if (gn->made == ABORTED) {
printf("`%s' not remade because of errors.\n",
gn->name);
- errors += 1;
+ errors++;
}
}
diff --git a/usr.bin/make/cond.c b/usr.bin/make/cond.c
index 9ca14a0f0f9..0e49cc16003 100644
--- a/usr.bin/make/cond.c
+++ b/usr.bin/make/cond.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: cond.c,v 1.36 2007/09/16 12:30:35 espie Exp $ */
+/* $OpenBSD: cond.c,v 1.37 2007/09/17 08:36:57 espie Exp $ */
/* $NetBSD: cond.c,v 1.7 1996/11/06 17:59:02 christos Exp $ */
/*
@@ -996,7 +996,7 @@ Cond_Eval(const char *line)
* so we return COND_PARSE, unless this endif isn't paired with
* a decent if. */
if (skipIfLevel != 0) {
- skipIfLevel -= 1;
+ skipIfLevel--;
return COND_SKIP;
} else {
if (condTop == MAXIF) {
@@ -1004,7 +1004,7 @@ Cond_Eval(const char *line)
return COND_INVALID;
} else {
skipLine = false;
- condTop += 1;
+ condTop++;
return COND_PARSE;
}
}
@@ -1055,7 +1055,7 @@ Cond_Eval(const char *line)
} else if (skipLine) {
/* Don't even try to evaluate a conditional that's not an else if
* we're skipping things... */
- skipIfLevel += 1;
+ skipIfLevel++;
return COND_SKIP;
}
@@ -1096,7 +1096,7 @@ Cond_Eval(const char *line)
}
if (!ifp->isElse)
- condTop -= 1;
+ condTop--;
else if (skipIfLevel != 0 || condStack[condTop].value) {
/* If this is an else-type conditional, it should only take effect
* if its corresponding if was evaluated and false. If its if was
diff --git a/usr.bin/make/engine.c b/usr.bin/make/engine.c
index 57aeeeb2c5a..e3ca2885ed0 100644
--- a/usr.bin/make/engine.c
+++ b/usr.bin/make/engine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: engine.c,v 1.3 2007/09/16 14:36:57 espie Exp $ */
+/* $OpenBSD: engine.c,v 1.4 2007/09/17 08:36:57 espie Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
* Copyright (c) 1988, 1989 by Adam de Boor
@@ -248,7 +248,7 @@ Make_HandleUse(
if (Lst_AddNew(&pgn->children, gn)) {
Lst_AtEnd(&gn->parents, pgn);
- pgn->unmade += 1;
+ pgn->unmade++;
}
}
diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c
index b53eebeaf7c..9c575f095e1 100644
--- a/usr.bin/make/job.c
+++ b/usr.bin/make/job.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: job.c,v 1.66 2007/09/16 15:12:12 espie Exp $ */
+/* $OpenBSD: job.c,v 1.67 2007/09/17 08:36:57 espie Exp $ */
/* $NetBSD: job.c,v 1.16 1996/11/06 17:59:08 christos Exp $ */
/*
@@ -692,7 +692,7 @@ JobPrintCommand(LstNode cmdNode, /* command string to print */
(void)fprintf(job->cmdFILE, fmt, arg); \
(void)fflush(job->cmdFILE);
- numCommands += 1;
+ numCommands++;
/* For debugging, we replace each command with the result of expanding
* the variables in the command. */
@@ -1005,14 +1005,14 @@ JobFinish(Job *job, /* job to finish */
}
job->flags &= ~JOB_CONTINUING;
Lst_AtEnd(&jobs, job);
- nJobs += 1;
+ nJobs++;
if (DEBUG(JOB)) {
(void)fprintf(stdout,
"Process %ld is continuing locally.\n",
(long)job->pid);
(void)fflush(stdout);
}
- nLocal += 1;
+ nLocal++;
if (nJobs == maxJobs) {
jobFull = true;
if (DEBUG(JOB)) {
@@ -1077,7 +1077,7 @@ JobFinish(Job *job, /* job to finish */
Make_Update(job->node);
free(job);
} else if (*status != 0) {
- errors += 1;
+ errors++;
free(job);
}
@@ -1236,7 +1236,7 @@ JobExec(Job *job, char **argv)
FD_SET(job->inPipe, outputsp);
}
- nLocal += 1;
+ nLocal++;
/*
* XXX: Used to not happen if REMOTE. Why?
*/
@@ -1249,7 +1249,7 @@ JobExec(Job *job, char **argv)
/*
* Now the job is actually running, add it to the table.
*/
- nJobs += 1;
+ nJobs++;
Lst_AtEnd(&jobs, job);
if (nJobs == maxJobs) {
jobFull = true;
@@ -2033,14 +2033,14 @@ Job_CatchChildren(bool block) /* true if should block on the wait. */
} else {
job = (Job *)Lst_Datum(jnode);
Lst_Remove(&jobs, jnode);
- nJobs -= 1;
+ nJobs--;
if (jobFull && DEBUG(JOB)) {
(void)fprintf(stdout,
"Job queue is no longer full.\n");
(void)fflush(stdout);
}
jobFull = false;
- nLocal -= 1;
+ nLocal--;
}
JobFinish(job, &status);
@@ -2091,7 +2091,7 @@ Job_CatchOutput(void)
job = (Job *)Lst_Datum(ln);
if (FD_ISSET(job->inPipe, readfdsp)) {
JobDoOutput(job, false);
- nfds -= 1;
+ nfds--;
}
}
}
diff --git a/usr.bin/make/make.c b/usr.bin/make/make.c
index 0b2bfa07157..66d1e038947 100644
--- a/usr.bin/make/make.c
+++ b/usr.bin/make/make.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: make.c,v 1.38 2007/09/16 12:09:36 espie Exp $ */
+/* $OpenBSD: make.c,v 1.39 2007/09/17 08:36:57 espie Exp $ */
/* $NetBSD: make.c,v 1.10 1996/11/06 17:59:15 christos Exp $ */
/*
@@ -203,7 +203,7 @@ Make_Update(GNode *cgn) /* the child node */
for (ln = Lst_First(&cgn->parents); ln != NULL; ln = Lst_Adv(ln)) {
pgn = (GNode *)Lst_Datum(ln);
if (pgn->make) {
- pgn->unmade -= 1;
+ pgn->unmade--;
if ( ! (cgn->type & (OP_EXEC|OP_USE))) {
if (cgn->made == MADE) {
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c
index 0b94c89202d..f6b63b1f2e2 100644
--- a/usr.bin/make/parse.c
+++ b/usr.bin/make/parse.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: parse.c,v 1.83 2007/09/16 12:30:35 espie Exp $ */
+/* $OpenBSD: parse.c,v 1.84 2007/09/17 08:36:57 espie Exp $ */
/* $NetBSD: parse.c,v 1.29 1997/03/10 21:20:04 christos Exp $ */
/*
@@ -1048,7 +1048,7 @@ ParseDoDependency(char *line) /* the line to parse */
} else {
if (*cp) {
*cp = '\0';
- cp += 1;
+ cp++;
}
ParseDoSrc(tOp, line);
diff --git a/usr.bin/make/suff.c b/usr.bin/make/suff.c
index 8c78396557d..b8c8a9cb6a2 100644
--- a/usr.bin/make/suff.c
+++ b/usr.bin/make/suff.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: suff.c,v 1.64 2007/09/16 12:30:35 espie Exp $ */
+/* $OpenBSD: suff.c,v 1.65 2007/09/17 08:36:57 espie Exp $ */
/* $NetBSD: suff.c,v 1.13 1996/11/06 17:59:25 christos Exp $ */
/*
@@ -885,7 +885,7 @@ SuffAddSrc(
s2->node = NULL;
s2->suff = s;
s2->children = 0;
- targ->children += 1;
+ targ->children++;
Lst_AtEnd(ls->l, s2);
#ifdef DEBUG_SRC
Lst_Init(&s2->cp);
@@ -902,7 +902,7 @@ SuffAddSrc(
s2->node = NULL;
s2->suff = s;
s2->children = 0;
- targ->children += 1;
+ targ->children++;
Lst_AtEnd(ls->l, s2);
#ifdef DEBUG_SRC
Lst_Init(&s2->cp);
@@ -1124,7 +1124,7 @@ SuffFindCmds(
ret->parent = targ;
ret->node = s;
ret->children = 0;
- targ->children += 1;
+ targ->children++;
#ifdef DEBUG_SRC
Lst_Init(&ret->cp);
printf("3 add %x %x\n", targ, ret);
diff --git a/usr.bin/make/util.c b/usr.bin/make/util.c
index 26a6b7554cd..eada1ceb58f 100644
--- a/usr.bin/make/util.c
+++ b/usr.bin/make/util.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: util.c,v 1.21 2003/06/25 15:11:06 millert Exp $ */
+/* $OpenBSD: util.c,v 1.22 2007/09/17 08:36:57 espie Exp $ */
/* $NetBSD: util.c,v 1.10 1996/12/31 17:56:04 christos Exp $ */
/*
@@ -429,7 +429,7 @@ strstr(string, substring)
* substring.
*/
- for (b = substring; *string != 0; string += 1) {
+ for (b = substring; *string != 0; string++) {
if (*string != *b)
continue;
a = string;