From 80f123ce2aacc8f3180b0b7a56a027e4804ae498 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 4 Aug 2019 23:52:39 +0200 Subject: Parser: set timestamp to zero if parsing failed When parsing of a timestamp failed (shouldn't happen) set the timestamp to zero. This should give less unpredictable results and silence a compiler warning. Signed-off-by: Berthold Stoeger --- core/parse-xml.c | 1 + 1 file changed, 1 insertion(+) (limited to 'core') diff --git a/core/parse-xml.c b/core/parse-xml.c index bca0269a3..79a7b53e0 100644 --- a/core/parse-xml.c +++ b/core/parse-xml.c @@ -343,6 +343,7 @@ static void sampletime(char *buffer, duration_t *time) time->seconds = (hr * 60 + min) * 60 + sec; break; default: + time->seconds = 0; printf("Strange sample time reading %s\n", buffer); } } -- cgit v1.2.3-70-g09d2