scron

simple cron daemon
git clone git://git.2f30.org/scron
Log | Files | Refs | README | LICENSE

commit c4e6cfc335f6213b53edbeec7c5d8bb0e97272db
parent 03c78d1338a35871a68d59001feb4a9ba83c8396
Author: sin <sin@2f30.org>
Date:   Sat, 26 Jul 2014 14:17:23 +0100

Minor style fix for consistency

Diffstat:
Mcrond.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/crond.c b/crond.c @@ -197,9 +197,9 @@ waitjob(void) static int isleap(int year) { - if(year % 400 == 0) + if (year % 400 == 0) return 1; - if(year % 100 == 0) + if (year % 100 == 0) return 0; return (year % 4 == 0); } @@ -473,7 +473,7 @@ main(int argc, char *argv[]) if (nflag == 0) { openlog(argv[0], LOG_CONS | LOG_PID, LOG_CRON); - if (daemon(1, 0) != 0) { + if (daemon(1, 0) < 0) { logerr("error: failed to daemonize %s\n", strerror(errno)); return EXIT_FAILURE; }