summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Goncharov <dgoncharov@users.sf.net>2023-04-30 09:07:17 -0400
committerPaul Smith <psmith@gnu.org>2023-04-30 09:40:47 -0400
commit5340a3d5d1c7d7c4d5b0424790ec312e1c1bc3d3 (patch)
treef1174de0e06db30f6592feda77cad4e5c47b1ee0
parentfec72ea308bcacb1dacdcab30b0ce9647a1631ca (diff)
downloadmake-git-5340a3d5d1c7d7c4d5b0424790ec312e1c1bc3d3.tar.gz
* src/remake.c (update_goal_chain): [SV 64016] Avoid double negation
-rw-r--r--src/remake.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/remake.c b/src/remake.c
index bdf78b3e..9c7939b9 100644
--- a/src/remake.c
+++ b/src/remake.c
@@ -157,7 +157,7 @@ update_goal_chain (struct goaldep *goaldeps)
{
/* Iterate over all double-colon entries for this file. */
struct file *file, *dchead;
- int stop = 0, any_not_updated = 0;
+ int stop = 0, all_updated = 1;
g = gu->shuf ? gu->shuf : gu;
@@ -253,7 +253,7 @@ update_goal_chain (struct goaldep *goaldeps)
/* Keep track if any double-colon entry is not finished.
When they are all finished, the goal is finished. */
- any_not_updated |= !file->updated;
+ all_updated &= file->updated;
file->dontcare = 0;
@@ -267,7 +267,7 @@ update_goal_chain (struct goaldep *goaldeps)
if (wait)
break;
- if (stop || !any_not_updated)
+ if (stop || all_updated)
{
/* If we have found nothing whatever to do for the goal,
print a message saying nothing needs doing. */
@@ -290,16 +290,13 @@ update_goal_chain (struct goaldep *goaldeps)
else
lastgoal->next = gu->next;
- gu = lastgoal == 0 ? goals : lastgoal->next;
-
if (stop)
break;
}
else
- {
- lastgoal = gu;
- gu = gu->next;
- }
+ lastgoal = gu;
+
+ gu = gu->next;
}
/* If we reached the end of the dependency graph update CONSIDERED