From: Phil Sutter Date: Wed, 11 Jan 2023 10:26:41 +0000 (+0100) Subject: meta: parse_iso_date() returns boolean X-Git-Tag: v1.0.7~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=db6e97bd667bf205cee22049f9d0fd6550cb43a7;p=thirdparty%2Fnftables.git meta: parse_iso_date() returns boolean 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 --- diff --git a/src/meta.c b/src/meta.c index bd8a41ba..013e8cba 100644 --- a/src/meta.c +++ b/src/meta.c @@ -433,7 +433,7 @@ success: 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;