From: Karel Zak Date: Mon, 23 May 2016 09:56:31 +0000 (+0200) Subject: include/timeutils: use pointer for time_t X-Git-Tag: v2.29-rc1~237 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01b47d46d76291ea338ecd5190e1e670f4ab890a;p=thirdparty%2Futil-linux.git include/timeutils: use pointer for time_t Signed-off-by: Karel Zak --- diff --git a/include/timeutils.h b/include/timeutils.h index 4b6098ae15..a1cd1b3530 100644 --- a/include/timeutils.h +++ b/include/timeutils.h @@ -64,6 +64,6 @@ enum { }; char *strtimeval_iso(struct timeval *tv, int flags); char *strtm_iso(struct tm *tm, int flags); -char *strtime_iso(time_t t, int flags); +char *strtime_iso(const time_t *t, int flags); #endif /* UTIL_LINUX_TIME_UTIL_H */ diff --git a/lib/timeutils.c b/lib/timeutils.c index c291043ede..bdc00d3375 100644 --- a/lib/timeutils.c +++ b/lib/timeutils.c @@ -376,9 +376,9 @@ char *strtm_iso(struct tm *tm, int flags) return format_iso_time(tm, 0, flags); } -char *strtime_iso(time_t t, int flags) +char *strtime_iso(const time_t *t, int flags) { - struct tm tm = *localtime(&t); + struct tm tm = *localtime(t); return format_iso_time(&tm, 0, flags); }