Fix guess_diff type

`unsigned_time_t` has the same size as `time_t`, but it doesn't mean
these types are same except for signedness.  For instance, while
`long` and `long long` has the same size and `time_t` is defined as
the latter on 64bit OpenBSD, `unsigned_time_t` has been defined as
`long`.
This commit is contained in:
Nobuyoshi Nakada 2022-12-19 13:14:46 +09:00
parent df4820e749
commit d64e10228d
No known key found for this signature in database
GPG Key ID: 7CD2805BFA3770C6

2
time.c
View File

@ -3193,7 +3193,7 @@ static const bool debug_guessrange =
static inline void
debug_report_guessrange(time_t guess_lo, time_t guess_hi)
{
unsigned_time_t guess_diff = (unsigned_time_t)(guess_hi-guess_lo);
time_t guess_diff = guess_hi - guess_lo;
fprintf(stderr, "find time guess range: %"PRI_TIMET_PREFIX"d - "
"%"PRI_TIMET_PREFIX"d : %"PRI_TIMET_PREFIX"u\n",
guess_lo, guess_hi, guess_diff);