From: Linus Torvalds Date: Fri, 2 Sep 2011 21:06:26 +0000 (-0700) Subject: Silently ignore zero pressure X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=a5e4c7ffd1da2e58d0d283389e0d9a0ffce7e783;p=ext%2Fsubsurface.git Silently ignore zero pressure Don't complain about them, they're just missing values Signed-off-by: Linus Torvalds --- diff --git a/parse-xml.c b/parse-xml.c index ca25a28..c66525f 100644 --- a/parse-xml.c +++ b/parse-xml.c @@ -227,6 +227,9 @@ static void pressure(char *buffer, void *_press) switch (integer_or_float(buffer, &val)) { case FLOAT: + /* Just ignore zero values */ + if (!val.fp) + break; switch (units.pressure) { case BAR: /* Assume mbar, but if it's really small, it's bar */