summaryrefslogtreecommitdiff
path: root/log.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2006-05-03 06:11:11 +0000
committerWayne Davison <wayned@samba.org>2006-05-03 06:11:11 +0000
commit38de2866e5892ffc77a96636cd706239cbffbf4b (patch)
treea780038b3f86cf3c8b6b412365066e6a95da7aa0 /log.c
parentbdac7621eea8aaf7330174f787f68c67215ed026 (diff)
downloadrsync-38de2866e5892ffc77a96636cd706239cbffbf4b.tar.gz
rsync-38de2866e5892ffc77a96636cd706239cbffbf4b.tar.bz2
rsync-38de2866e5892ffc77a96636cd706239cbffbf4b.zip
Made log_init() call timestring() instead of just localtime() prior to a
chroot (note that timestring() makes use of localtime() plus strftime()).
Diffstat (limited to 'log.c')
-rw-r--r--log.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/log.c b/log.c
index 493ee1a9..3f57a44b 100644
--- a/log.c
+++ b/log.c
@@ -154,17 +154,14 @@ static void logfile_open(void)
void log_init(void)
{
- time_t t;
-
if (log_initialised)
return;
log_initialised = 1;
- /* this looks pointless, but it is needed in order for the
+ /* This looks pointless, but it is needed in order for the
* C library on some systems to fetch the timezone info
- * before the chroot */
- t = time(NULL);
- localtime(&t);
+ * before the chroot. */
+ timestring(time(NULL));
/* optionally use a log file instead of syslog */
logfname = lp_log_file();