diff options
Diffstat (limited to 'libglusterfs')
| -rw-r--r-- | libglusterfs/src/common-utils.h | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h index 7e91457177f..5968cd0608d 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);          }  }  | 
