]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
include/timeutils: use pointer for time_t
authorKarel Zak <kzak@redhat.com>
Mon, 23 May 2016 09:56:31 +0000 (11:56 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 23 May 2016 09:56:31 +0000 (11:56 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
include/timeutils.h
lib/timeutils.c

index 4b6098ae15338e981218dfe415ee95fe5243a9b0..a1cd1b3530a9aec08829d31072e58cec8c6166f2 100644 (file)
@@ -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 */
index c291043ede10cc8d09b77ba7a32a8b9222370e34..bdc00d3375f051af74e7bf72b64f02619b38a525 100644 (file)
@@ -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);
 }