From a7787067919d28a2e0564985e41dea42ea0321d8 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sat, 5 Mar 2011 17:28:49 +0100 Subject: Simplify date_sec2date_fmt() in "utils.c". Signed-off-by: Lukas Fleischer --- src/utils.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src') 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); } -- cgit v1.2.3-70-g09d2