summaryrefslogtreecommitdiff
path: root/src/remake.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2022-10-01 16:45:41 -0400
committerPaul Smith <psmith@gnu.org>2022-10-02 08:55:29 -0400
commitad84ec2fdc331030ab154508d2229e151ed91fc8 (patch)
tree28e69bd3b6f761081485bd198d8598f4739d34e8 /src/remake.c
parent26b9f307147e5e75b6494c28d978a87b3a881cae (diff)
downloadmake-git-ad84ec2fdc331030ab154508d2229e151ed91fc8.tar.gz
* src/remake.c (update_file_1): Return valid enum element, not 0.
Diffstat (limited to 'src/remake.c')
-rw-r--r--src/remake.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/remake.c b/src/remake.c
index 414a5410..69a0e6cb 100644
--- a/src/remake.c
+++ b/src/remake.c
@@ -416,7 +416,7 @@ complain (struct file *file)
}
/* Consider a single 'struct file' and update it as appropriate.
- Return 0 on success, or non-0 on failure. */
+ Return an update_status value; use us_success if we aren't sure yet. */
static enum update_status
update_file_1 (struct file *file, unsigned int depth)
@@ -449,7 +449,7 @@ update_file_1 (struct file *file, unsigned int depth)
}
DBF (DB_VERBOSE, _("File '%s' was considered already.\n"));
- return 0;
+ return us_success;
}
switch (file->command_state)
@@ -459,7 +459,7 @@ update_file_1 (struct file *file, unsigned int depth)
break;
case cs_running:
DBF (DB_VERBOSE, _("Still updating file '%s'.\n"));
- return 0;
+ return us_success;
case cs_finished:
DBF (DB_VERBOSE, _("Finished updating file '%s'.\n"));
return file->update_status;
@@ -720,7 +720,7 @@ update_file_1 (struct file *file, unsigned int depth)
set_command_state (file, cs_deps_running);
--depth;
DBF (DB_VERBOSE, _("The prerequisites of '%s' are being made.\n"));
- return 0;
+ return us_success;
}
/* If any dependency failed, give up now. */
@@ -864,7 +864,7 @@ update_file_1 (struct file *file, unsigned int depth)
file = file->prev;
}
- return 0;
+ return us_success;
}
DBF (DB_BASIC, _("Must remake target '%s'.\n"));
@@ -883,7 +883,7 @@ update_file_1 (struct file *file, unsigned int depth)
if (file->command_state != cs_finished)
{
DBF (DB_VERBOSE, _("Recipe of '%s' is being run.\n"));
- return 0;
+ return us_success;
}
switch (file->update_status)