summaryrefslogtreecommitdiff
path: root/src/readcdf.c
diff options
context:
space:
mode:
authorChristos Zoulas <christos@zoulas.com>2012-05-15 17:14:36 +0000
committerChristos Zoulas <christos@zoulas.com>2012-05-15 17:14:36 +0000
commita5faca599f63db734dc0b43b0105d5a57246e6d9 (patch)
treeb4f04f23e4cd1b6d5d24656e9ea0e8201fc44ba7 /src/readcdf.c
parentffa3cb799e0d79ed40b06385d96ce66502db6ddb (diff)
downloadfile-git-a5faca599f63db734dc0b43b0105d5a57246e6d9.tar.gz
use ctime_r, asctime_r.
Diffstat (limited to 'src/readcdf.c')
-rw-r--r--src/readcdf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/readcdf.c b/src/readcdf.c
index c4bea0d4..1e7c9a38 100644
--- a/src/readcdf.c
+++ b/src/readcdf.c
@@ -26,7 +26,7 @@
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: readcdf.c,v 1.29 2012/02/20 20:04:58 christos Exp $")
+FILE_RCSID("@(#)$File: readcdf.c,v 1.30 2012/03/03 15:44:58 christos Exp $")
#endif
#include <stdlib.h>
@@ -125,8 +125,8 @@ cdf_file_property_info(struct magic_set *ms, const cdf_property_info_t *info,
case CDF_FILETIME:
tp = info[i].pi_tp;
if (tp != 0) {
+ char tbuf[64];
if (tp < 1000000000000000LL) {
- char tbuf[64];
cdf_print_elapsed_time(tbuf,
sizeof(tbuf), tp);
if (NOTMIME(ms) && file_printf(ms,
@@ -135,7 +135,7 @@ cdf_file_property_info(struct magic_set *ms, const cdf_property_info_t *info,
} else {
char *c, *ec;
cdf_timestamp_to_timespec(&ts, tp);
- c = cdf_ctime(&ts.tv_sec);
+ c = cdf_ctime(&ts.tv_sec, tbuf);
if ((ec = strchr(c, '\n')) != NULL)
*ec = '\0';