]> granicus.if.org Git - fcron/commitdiff
*** empty log message ***
authorthib <thib>
Wed, 14 Feb 2001 13:52:09 +0000 (13:52 +0000)
committerthib <thib>
Wed, 14 Feb 2001 13:52:09 +0000 (13:52 +0000)
database.c
fcron.c
log.c

index 000b38231e13d5617302850962fa08fd782fb791..c99af69f7fd5186f28cd5b1272f8e7a9564dd78e 100644 (file)
@@ -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 f72b257cdb97f059974912e9316a1dd53685f95f..c1d6852cfba76a97f33b33956a4e63c2aa6f6f8b 100644 (file)
--- a/fcron.c
+++ b/fcron.c
  *  `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 9cf8e6439343926b1cee8bbc34669ee7bf8545b3..88679e9a32b92abfe8e9ea693aa100f5c9a9996a 100644 (file)
--- 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 <itzur@actcom.co.il> ( 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;
 }