mask is restored.
* libmisc/sulog.c: Add brackets.
* libmisc/sulog.c: Ignore return value of time() when use with a
non NULL argument.
+2008-06-13 Nicolas François <nicolas.francois@centraliens.net>
+
+ * libmisc/sulog.c: Ignore the return value of umask() when the
+ mask is restored.
+ * libmisc/sulog.c: Add brackets.
+ * libmisc/sulog.c: Ignore return value of time() when use with a
+ non NULL argument.
+
2008-06-13 Nicolas François <nicolas.francois@centraliens.net>
* libmisc/log.c: Avoid assignments in comparisons.
oldgid = 0;
}
fp = fopen (sulog_file, "a+");
- umask (oldmask);
+ (void) umask (oldmask);
if ((oldgid != 0) && (setgid (oldgid) != 0)) {
perror ("setgid");
SYSLOG ((LOG_ERR,
/* Do not return if the group permission were raised. */
exit (1);
}
- if (fp == (FILE *) 0)
+ if (fp == (FILE *) 0) {
return; /* can't open or create logfile */
+ }
- time (&now);
+ (void) time (&now);
tm = localtime (&now);
fprintf (fp, "SU %.02d/%.02d %.02d:%.02d %c %s %s-%s\n",