time_t is usually signed, just don’t cast
authormirabilos <m@mirbsd.org>
Sun, 10 Feb 2019 19:48:12 +0000 (20:48 +0100)
committermirabilos <mirabilos@evolvis.org>
Sun, 10 Feb 2019 19:48:12 +0000 (20:48 +0100)
tar.c

diff --git a/tar.c b/tar.c
index 4a2f3c6..d9e20fd 100644 (file)
--- a/tar.c
+++ b/tar.c
@@ -1045,7 +1045,7 @@ ustar_wr(ARCHD *arcn)
 
        t_uid   = (anonarch & ANON_UIDGID) ? 0UL : (u_long)arcn->sb.st_uid;
        t_gid   = (anonarch & ANON_UIDGID) ? 0UL : (u_long)arcn->sb.st_gid;
-       t_mtime = (anonarch & ANON_MTIME)  ? 0UL : arcn->sb.st_mtime;
+       t_mtime = (anonarch & ANON_MTIME)  ? 0   : arcn->sb.st_mtime;
 
        /*
         * set the fields in the header that are type dependent