]> git.ipfire.org Git - thirdparty/git.git/commit - date.c
date.c: fix unsigned time_t comparison
authorMike Gorchak <mike.gorchak.qnx@gmail.com>
Mon, 25 Feb 2013 21:51:16 +0000 (23:51 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 25 Feb 2013 22:23:43 +0000 (14:23 -0800)
commite6e87516f569c2344f760287aec66f70da856c6d
tree815348aafa1fc05543c945d3876327544db055fa
parent4dac0679feaebbf6545daec14480cf6b94cb74ed
date.c: fix unsigned time_t comparison

tm_to_time_t() returns (time_t)-1 when it sees an error.  On
platforms with unsigned time_t, this value will be larger than any
valid timestamp and will break the "Is this older than 10 days in
the future?" check.

Signed-off-by: Mike Gorchak <mike.gorchak.qnx@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
date.c