summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2023-01-11 11:26:41 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2023-11-02 11:56:18 +0100
commitb7f01ac6e9e7aac6d0194f285bf395a311ee32ea (patch)
tree0dc0a40e2c069b930af18b98faa17c07a1815e43
parentb694dbdee37c623456f90f202244c6b3e48b70ab (diff)
meta: parse_iso_date() returns boolean
commit db6e97bd667bf205cee22049f9d0fd6550cb43a7 upstream. 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@nwl.cc>
-rw-r--r--src/meta.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/meta.c b/src/meta.c
index 257bbc9f..b7e8663c 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;