(mtime_coder): Treat non-null data as a pointer to struct timespec, overriding st->mtime

This commit is contained in:
Sergey Poznyakoff
2006-11-13 10:39:15 +00:00
parent 415d9c9e15
commit 6712656eb2

View File

@@ -1094,9 +1094,10 @@ ctime_decoder (struct tar_stat_info *st,
static void static void
mtime_coder (struct tar_stat_info const *st, char const *keyword, mtime_coder (struct tar_stat_info const *st, char const *keyword,
struct xheader *xhdr, void const *data __attribute__ ((unused))) struct xheader *xhdr, void const *data)
{ {
code_time (st->mtime, keyword, xhdr); const struct timespec mtime = data ? *(struct timespec *) data : st->mtime;
code_time (mtime, keyword, xhdr);
} }
static void static void