From: Sergey Poznyakoff Date: Mon, 13 Nov 2006 10:39:15 +0000 (+0000) Subject: (mtime_coder): Treat non-null data as a pointer to struct timespec, overriding st... X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=6712656eb2a8fbab9f8cc1c2dd744eaf5fffbcd5;p=chaz%2Ftar (mtime_coder): Treat non-null data as a pointer to struct timespec, overriding st->mtime --- diff --git a/src/xheader.c b/src/xheader.c index 5676dca..36afd3d 100644 --- a/src/xheader.c +++ b/src/xheader.c @@ -1094,9 +1094,10 @@ ctime_decoder (struct tar_stat_info *st, static void 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