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 <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2019-08-04 23:52:39 +02:00 committed by Dirk Hohndel
parent 794066b236
commit 80f123ce2a

View file

@ -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);
}
}