summaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer2008-05-19 09:29:47 +0000
committerBernhard Reutner-Fischer2008-05-19 09:29:47 +0000
commit636a1f85e89432601c59cdc3239fc867b4adf051 (patch)
treed43c9ca120c29bf2d4567b1bb0674c6a8bae2b6d /miscutils
parentcb83abd7b6b052224c1f3b998e863aac76914afd (diff)
downloadbusybox-636a1f85e89432601c59cdc3239fc867b4adf051.zip
busybox-636a1f85e89432601c59cdc3239fc867b4adf051.tar.gz
- use EXIT_{SUCCESS,FAILURE}. No object-code changes
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/crond.c4
-rw-r--r--miscutils/devfsd.c6
-rw-r--r--miscutils/less.c4
-rw-r--r--miscutils/time.c2
-rw-r--r--miscutils/watchdog.c2
5 files changed, 9 insertions, 9 deletions
diff --git a/miscutils/crond.c b/miscutils/crond.c
index 6db4df4..2bed5a4 100644
--- a/miscutils/crond.c
+++ b/miscutils/crond.c
@@ -797,7 +797,7 @@ ForkJob(const char *user, CronLine *line, int mailFd,
if (mail_filename) {
fdprintf(1, "Exec failed: %s -c %s\n", prog, arg);
}
- _exit(0);
+ _exit(EXIT_SUCCESS);
}
line->cl_Pid = pid;
@@ -930,7 +930,7 @@ static void RunJob(const char *user, CronLine *line)
execl(DEFAULT_SHELL, DEFAULT_SHELL, "-c", line->cl_Shell, NULL);
crondlog(ERR20 "can't exec, user %s cmd %s %s %s", user,
DEFAULT_SHELL, "-c", line->cl_Shell);
- _exit(0);
+ _exit(EXIT_SUCCESS);
}
if (pid < 0) {
/* FORK FAILED */
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c
index bb6b679..782457a 100644
--- a/miscutils/devfsd.c
+++ b/miscutils/devfsd.c
@@ -283,9 +283,9 @@ static const char bb_msg_variable_not_found[] ALIGN1 = "variable: %s not found";
#else
#define info_logger(p, fmt, args...)
#define msg_logger(p, fmt, args...)
-#define msg_logger_and_die(p, fmt, args...) exit(1)
+#define msg_logger_and_die(p, fmt, args...) exit(EXIT_FAILURE)
#define error_logger(p, fmt, args...)
-#define error_logger_and_die(p, fmt, args...) exit(1)
+#define error_logger_and_die(p, fmt, args...) exit(EXIT_FAILURE)
#endif
static void safe_memcpy(char *dest, const char *src, int len)
@@ -402,7 +402,7 @@ int devfsd_main(int argc, char **argv)
dir_operation(SERVICE, mount_point, 0, NULL);
if (ENABLE_DEVFSD_FG_NP && no_polling)
- exit(0);
+ exit(EXIT_SUCCESS);
if (ENABLE_DEVFSD_VERBOSE || ENABLE_DEBUG)
logmode = LOGMODE_BOTH;
diff --git a/miscutils/less.c b/miscutils/less.c
index 25b91c0..f69bce9 100644
--- a/miscutils/less.c
+++ b/miscutils/less.c
@@ -882,7 +882,7 @@ static void colon_process(void)
change_file(-1);
break;
case 'q':
- less_exit(0);
+ less_exit(EXIT_SUCCESS);
break;
case 'x':
change_file(0);
@@ -1270,7 +1270,7 @@ static void keypress_process(int keypress)
buffer_line(cur_fline);
break;
case 'q': case 'Q':
- less_exit(0);
+ less_exit(EXIT_SUCCESS);
break;
#if ENABLE_FEATURE_LESS_MARKS
case 'm':
diff --git a/miscutils/time.c b/miscutils/time.c
index ed43859..a6d158c 100644
--- a/miscutils/time.c
+++ b/miscutils/time.c
@@ -424,5 +424,5 @@ int time_main(int argc ATTRIBUTE_UNUSED, char **argv)
return WTERMSIG(res.waitstatus);
if (WIFEXITED(res.waitstatus))
return WEXITSTATUS(res.waitstatus);
- fflush_stdout_and_exit(0);
+ fflush_stdout_and_exit(EXIT_SUCCESS);
}
diff --git a/miscutils/watchdog.c b/miscutils/watchdog.c
index a5061f5..4ad21cb 100644
--- a/miscutils/watchdog.c
+++ b/miscutils/watchdog.c
@@ -20,7 +20,7 @@ static void watchdog_shutdown(int sig ATTRIBUTE_UNUSED)
write(3, &V, 1); /* Magic, see watchdog-api.txt in kernel */
if (ENABLE_FEATURE_CLEAN_UP)
close(3);
- exit(0);
+ exit(EXIT_SUCCESS);
}
int watchdog_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;