From a5e4c7ffd1da2e58d0d283389e0d9a0ffce7e783 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 2 Sep 2011 14:06:26 -0700 Subject: [PATCH] Silently ignore zero pressure Don't complain about them, they're just missing values Signed-off-by: Linus Torvalds --- parse-xml.c | 3 +++ 1 file changed, 3 insertions(+) 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 */ -- 2.45.2