aboutsummaryrefslogtreecommitdiff
path: root/miscutils/crond.c
diff options
context:
space:
mode:
authorGravatar Denis Vlasenko <vda.linux@googlemail.com>2006-10-26 23:21:47 +0000
committerGravatar Denis Vlasenko <vda.linux@googlemail.com>2006-10-26 23:21:47 +0000
commitf0ed376eda5d5c25d270e5100a881fb2d801bee6 (patch)
tree79166b700c497fbe798b6031e5bbff97e0933573 /miscutils/crond.c
parent670a6626cabc1498f32b35f959591f8621d8447e (diff)
downloadbusybox-f0ed376eda5d5c25d270e5100a881fb2d801bee6.tar.gz
busybox-f0ed376eda5d5c25d270e5100a881fb2d801bee6.tar.bz2
remove bb_printf and the like
Diffstat (limited to 'miscutils/crond.c')
-rw-r--r--miscutils/crond.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/miscutils/crond.c b/miscutils/crond.c
index 4fc940b79..b18e27489 100644
--- a/miscutils/crond.c
+++ b/miscutils/crond.c
@@ -264,7 +264,7 @@ int crond_main(int ac, char **av)
}
}
}
- bb_fflush_stdout_and_exit(EXIT_SUCCESS); /* not reached */
+ return 0; /* not reached */
}
static int ChangeUser(const char *user)
@@ -278,7 +278,7 @@ static int ChangeUser(const char *user)
pas = getpwnam(user);
if (pas == 0) {
crondlog("\011failed to get uid for %s", user);
- return (-1);
+ return -1;
}
setenv("USER", pas->pw_name, 1);
setenv("HOME", pas->pw_dir, 1);
@@ -290,16 +290,16 @@ static int ChangeUser(const char *user)
err_msg = change_identity_e2str(pas);
if (err_msg) {
crondlog("\011%s for user %s", err_msg, user);
- return (-1);
+ return -1;
}
if (chdir(pas->pw_dir) < 0) {
crondlog("\011chdir failed: %s: %m", pas->pw_dir);
if (chdir(TMPDIR) < 0) {
crondlog("\011chdir failed: %s: %m", TMPDIR);
- return (-1);
+ return -1;
}
}
- return (pas->pw_uid);
+ return pas->pw_uid;
}
static void startlogger(void)
@@ -377,7 +377,7 @@ static char *ParseField(char *user, char *ary, int modvalue, int off,
int n2 = -1;
if (base == NULL) {
- return (NULL);
+ return NULL;
}
while (*ptr != ' ' && *ptr != '\t' && *ptr != '\n') {
@@ -420,7 +420,7 @@ static char *ParseField(char *user, char *ary, int modvalue, int off,
if (skip == 0) {
crondlog("\111failed user %s parsing %s\n", user, base);
- return (NULL);
+ return NULL;
}
if (*ptr == '-' && n2 < 0) {
++ptr;
@@ -460,7 +460,7 @@ static char *ParseField(char *user, char *ary, int modvalue, int off,
if (failsafe == 0) {
crondlog("\111failed user %s parsing %s\n", user, base);
- return (NULL);
+ return NULL;
}
}
if (*ptr != ',') {
@@ -473,7 +473,7 @@ static char *ParseField(char *user, char *ary, int modvalue, int off,
if (*ptr != ' ' && *ptr != '\t' && *ptr != '\n') {
crondlog("\111failed user %s parsing %s\n", user, base);
- return (NULL);
+ return NULL;
}
while (*ptr == ' ' || *ptr == '\t' || *ptr == '\n') {
@@ -490,7 +490,7 @@ static char *ParseField(char *user, char *ary, int modvalue, int off,
}
#endif
- return (ptr);
+ return ptr;
}
static void FixDayDow(CronLine * line)
@@ -777,7 +777,7 @@ static int TestJobs(time_t t1, time_t t2)
}
}
}
- return (nJobs);
+ return nJobs;
}
static void RunJobs(void)
@@ -843,7 +843,7 @@ static int CheckJobs(void)
}
nStillRunning += file->cf_Running;
}
- return (nStillRunning);
+ return nStillRunning;
}