aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/utils.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/utils.c b/src/utils.c
index bee5e55..5a59556 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -463,11 +463,7 @@ date_sec2date_str (long sec, char *datefmt)
void
date_sec2date_fmt (long sec, const char *fmt, char *datef)
{
- struct tm *lt;
- time_t t;
-
- t = sec;
- lt = localtime (&t);
+ struct tm *lt = localtime ((time_t *)&sec);
strftime (datef, BUFSIZ, fmt, lt);
}