]> git.ipfire.org Git - thirdparty/tar.git/commit
Fix tests/ckmtime.c arithmetic
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 30 Jul 2024 15:35:59 +0000 (08:35 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 4 Aug 2024 08:41:43 +0000 (01:41 -0700)
commitdcc90722ac885d6e5cd0b4ba59ae9f3666a873c3
treebdc454cfc9ba81a941cad8702f3fb21084751531
parent7557fdd4df25e0f2c504361b613b9d7fee14d6de
Fix tests/ckmtime.c arithmetic

* tests/ckmtime.c (main): Don’t assume time_t is signed.
Avoid integer overflows (quite possible if time_t is 32 bit).
Do calculations precisely, without any rounding errors.
tests/ckmtime.c