summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/common-utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/common-utils.h')
-rw-r--r--libglusterfs/src/common-utils.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h
index 7e9145717..5968cd060 100644
--- a/libglusterfs/src/common-utils.h
+++ b/libglusterfs/src/common-utils.h
@@ -449,10 +449,10 @@ gf_time_fmt (char *dst, size_t sz_dst, time_t utime, unsigned int fmt)
if (timefmt_last == -1)
_gf_timestuff (&timefmt_last, &fmts, &zeros);
if (timefmt_last < fmt) fmt = gf_timefmt_default;
- if (gmtime_r (&utime, &tm) != NULL) {
+ if (utime && gmtime_r (&utime, &tm) != NULL) {
strftime (dst, sz_dst, fmts[fmt], &tm);
} else {
- strncpy (dst, zeros[fmt], sz_dst);
+ strncpy (dst, "N/A", sz_dst);
}
}