Returning ts if 'ts == (time_t) -1' signals success to caller despite failure. Fixes: 4460b839b945a ("meta: fix compiler warning in date_type_parse()") Signed-off-by: Phil Sutter <phil@xxxxxx> --- src/meta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/meta.c b/src/meta.c index bd8a41ba3a032..013e8cbaf38a5 100644 --- a/src/meta.c +++ b/src/meta.c @@ -433,7 +433,7 @@ static bool parse_iso_date(uint64_t *tstamp, const char *sym) cur_tm = localtime(&ts); if (ts == (time_t) -1 || cur_tm == NULL) - return ts; + return false; /* Substract tm_gmtoff to get the current time */ *tstamp = ts - cur_tm->tm_gmtoff; -- 2.38.0