diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2023-08-19 04:21:07 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2023-08-19 04:21:07 +0000 |
commit | 5015c0013b39155b47187937694998852498509a (patch) | |
tree | edd444e784b11c2edad1848fcff760d378f82b97 /bin | |
parent | e3a1dbdce4f6b0725b9c764157e086fcb0834e6e (diff) |
Copy entire st_*tim structs at once, rather than copying
the st_*time and (obsolete) st_*timensec members separately.
ok millert@
Diffstat (limited to 'bin')
-rw-r--r-- | bin/pax/tar.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/bin/pax/tar.c b/bin/pax/tar.c index b47c96bf084..5876d5ceeb6 100644 --- a/bin/pax/tar.c +++ b/bin/pax/tar.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tar.c,v 1.71 2023/06/26 18:00:59 millert Exp $ */ +/* $OpenBSD: tar.c,v 1.72 2023/08/19 04:21:05 guenther Exp $ */ /* $NetBSD: tar.c,v 1.5 1995/03/21 09:07:49 cgd Exp $ */ /*- @@ -414,8 +414,7 @@ tar_rd(ARCHD *arcn, char *buf) arcn->sb.st_mtime = MAX_TIME_T; else arcn->sb.st_mtime = val; - arcn->sb.st_ctime = arcn->sb.st_atime = arcn->sb.st_mtime; - arcn->sb.st_ctimensec = arcn->sb.st_atimensec = arcn->sb.st_mtimensec; + arcn->sb.st_ctim = arcn->sb.st_atim = arcn->sb.st_mtim; /* * have to look at the last character, it may be a '/' and that is used @@ -793,12 +792,10 @@ reset: arcn->sb.st_mtime = val; } if (arcn->sb.st_ctime == 0) { - arcn->sb.st_ctime = arcn->sb.st_mtime; - arcn->sb.st_ctimensec = arcn->sb.st_mtimensec; + arcn->sb.st_ctim = arcn->sb.st_mtim; } if (arcn->sb.st_atime == 0) { - arcn->sb.st_atime = arcn->sb.st_mtime; - arcn->sb.st_atimensec = arcn->sb.st_mtimensec; + arcn->sb.st_atim = arcn->sb.st_mtim; } /* |