]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Silently ignore zero pressure
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 2 Sep 2011 21:06:26 +0000 (14:06 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 2 Sep 2011 21:06:26 +0000 (14:06 -0700)
Don't complain about them, they're just missing values

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
parse-xml.c

index ca25a28d6b091e27ae8a65ba9bc74e2875b5ed35..c66525ffc6e6a22ac05b59f1ae374734906223bc 100644 (file)
@@ -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 */