summaryrefslogtreecommitdiffstats
path: root/parse-xml.c
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-09-02 14:06:26 -0700
committerGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-09-02 14:06:26 -0700
commita5e4c7ffd1da2e58d0d283389e0d9a0ffce7e783 (patch)
tree9f95d69235bedd0f5be8b421a7198d22ebe81154 /parse-xml.c
parent9506c4bf0a6626b81ae5fad25fb26cf57d9ce8fe (diff)
downloadsubsurface-a5e4c7ffd1da2e58d0d283389e0d9a0ffce7e783.tar.gz
Silently ignore zero pressure
Don't complain about them, they're just missing values Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'parse-xml.c')
-rw-r--r--parse-xml.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/parse-xml.c b/parse-xml.c
index ca25a28d6..c66525ffc 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 */