From: thib Date: Wed, 14 Feb 2001 13:52:09 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: ver1564~329 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d56a8bcc12f34b591006ab718e8fd8621a5bf6a0;p=fcron *** empty log message *** --- diff --git a/database.c b/database.c index 000b382..c99af69 100644 --- a/database.c +++ b/database.c @@ -22,7 +22,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: database.c,v 1.47 2001-02-01 20:52:14 thib Exp $ */ + /* $Id: database.c,v 1.48 2001-02-14 13:53:17 thib Exp $ */ #include "fcron.h" @@ -1047,7 +1047,7 @@ mail_notrun(CL *line, char context, struct tm *since) (since->tm_year + 1900), since->tm_wday, since->tm_hour, since->tm_min); xwrite(fd, buf); - snprintf(buf, sizeof(buf), "It will be next executed at %d/%d/%d wday:" + snprintf(buf,sizeof(buf),"It will be next executed at %d/%d/%d wday:" "%d %02d:%02d\n", (next.tm_mon + 1), next.tm_mday, (next.tm_year+1900), next.tm_wday, next.tm_hour, next.tm_min); xwrite(fd, buf); @@ -1061,8 +1061,8 @@ mail_notrun(CL *line, char context, struct tm *since) snprintf(buf, sizeof(buf), "due to a too high system load average or " "too many lavg-serial jobs.\n"); xwrite(fd, buf); - snprintf(buf, sizeof(buf), "It will be next executed at %d/%d/%d wday:" - "%d %02d:%02d\n", (next.tm_mon + 1), next.tm_mday, + snprintf(buf, sizeof(buf), "It will be next executed at %d/%d/%d " + "wday:%d %02d:%02d\n", (next.tm_mon + 1), next.tm_mday, (next.tm_year+1900), next.tm_wday, next.tm_hour, next.tm_min); xwrite(fd, buf); } diff --git a/fcron.c b/fcron.c index f72b257..c1d6852 100644 --- a/fcron.c +++ b/fcron.c @@ -21,11 +21,11 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: fcron.c,v 1.40 2001-02-10 12:56:02 thib Exp $ */ + /* $Id: fcron.c,v 1.41 2001-02-14 13:52:38 thib Exp $ */ #include "fcron.h" -char rcs_info[] = "$Id: fcron.c,v 1.40 2001-02-10 12:56:02 thib Exp $"; +char rcs_info[] = "$Id: fcron.c,v 1.41 2001-02-14 13:52:38 thib Exp $"; void main_loop(void); void check_signal(void); @@ -437,9 +437,9 @@ main(int argc, char **argv) if ( ! (pass = getpwnam(USERNAME)) ) die("user \"%s\" is not in passwd file. Aborting.", USERNAME); if (setregid(pass->pw_gid, 0) != 0 ) - die_e("Could not set gid to " GROUPNAME); + die_e("Could not setregid to " GROUPNAME); if (setreuid(pass->pw_uid, 0) != 0 ) - die_e("Could not set uid to " USERNAME); + die_e("Could not setreuid to " USERNAME); } #endif diff --git a/log.c b/log.c index 9cf8e64..88679e9 100644 --- a/log.c +++ b/log.c @@ -22,7 +22,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: log.c,v 1.4 2001-01-12 21:42:44 thib Exp $ */ + /* $Id: log.c,v 1.5 2001-02-14 13:52:09 thib Exp $ */ /* This code is inspired by Anacron's sources of Itai Tzur ( thanks to him ) */ @@ -32,7 +32,7 @@ static void xopenlog(void); -static char truncated[]=" (truncated)"; +static char truncated[] = " (truncated)"; static int log_open=0; @@ -50,7 +50,7 @@ void xcloselog() { if (log_open) closelog(); - log_open=0; + log_open = 0; } @@ -65,9 +65,9 @@ make_msg(char *fmt, va_list args) return NULL; /* There's some confusion in the documentation about what vsnprintf * returns when the buffer overflows. Hmmm... */ - len=vsnprintf(msg, MAX_MSG + 1, fmt, args); - if (len>=MAX_MSG) - strcpy(msg+sizeof(msg)-sizeof(truncated), truncated); + len = vsnprintf(msg, MAX_MSG + 1, fmt, args); + if (len >= MAX_MSG) + strcpy(msg + sizeof(msg) - sizeof(truncated), truncated); return msg; }