summaryrefslogtreecommitdiff
path: root/runit/svlogd.c
diff options
context:
space:
mode:
authorDenys Vlasenko2010-01-09 19:10:49 +0100
committerDenys Vlasenko2010-01-09 19:10:49 +0100
commitdc698bb038756a926aaa529bda1b939eab2c1676 (patch)
tree4084a40897d9d81816228935a1398e80dd4b173b /runit/svlogd.c
parent0681137972dc89b5003b0415e09184c0ecf1c875 (diff)
downloadbusybox-dc698bb038756a926aaa529bda1b939eab2c1676.zip
busybox-dc698bb038756a926aaa529bda1b939eab2c1676.tar.gz
*: make it easier to distinquish "struct tm", pointer to one, etc
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'runit/svlogd.c')
-rw-r--r--runit/svlogd.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/runit/svlogd.c b/runit/svlogd.c
index fe40cd8..f556c7d 100644
--- a/runit/svlogd.c
+++ b/runit/svlogd.c
@@ -266,18 +266,18 @@ static char* wstrdup(const char *str)
/* NUL terminated */
static void fmt_time_human_30nul(char *s)
{
- struct tm *t;
+ struct tm *ptm;
struct timeval tv;
gettimeofday(&tv, NULL);
- t = gmtime(&(tv.tv_sec));
+ ptm = gmtime(&tv.tv_sec);
sprintf(s, "%04u-%02u-%02u_%02u:%02u:%02u.%06u000",
- (unsigned)(1900 + t->tm_year),
- (unsigned)(t->tm_mon + 1),
- (unsigned)(t->tm_mday),
- (unsigned)(t->tm_hour),
- (unsigned)(t->tm_min),
- (unsigned)(t->tm_sec),
+ (unsigned)(1900 + ptm->tm_year),
+ (unsigned)(ptm->tm_mon + 1),
+ (unsigned)(ptm->tm_mday),
+ (unsigned)(ptm->tm_hour),
+ (unsigned)(ptm->tm_min),
+ (unsigned)(ptm->tm_sec),
(unsigned)(tv.tv_usec)
);
/* 4+1 + 2+1 + 2+1 + 2+1 + 2+1 + 2+1 + 9 = */