]> Dogcows Code - chaz/tar/commitdiff
(mtime_coder): Treat non-null data as a pointer to struct timespec, overriding st...
authorSergey Poznyakoff <gray@gnu.org.ua>
Mon, 13 Nov 2006 10:39:15 +0000 (10:39 +0000)
committerSergey Poznyakoff <gray@gnu.org.ua>
Mon, 13 Nov 2006 10:39:15 +0000 (10:39 +0000)
src/xheader.c

index 5676dcabfb5ee11c933b2e73260eb4b7d47be841..36afd3d77509ddcda8bbb79b12347858a3861c90 100644 (file)
@@ -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
This page took 0.024409 seconds and 4 git commands to generate.