]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Don't bother saving n2 percentage
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 4 Sep 2011 03:50:11 +0000 (20:50 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 4 Sep 2011 03:50:11 +0000 (20:50 -0700)
It's all calculated anyway, and for the same reason we don't bother even
parsing it at load time, we really shouldn't bother saving it either.

The only thing you can do with that value is "check if the percentages
add up to 100%", and so what?

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

index 309f7cc08c452c28283e415b7028aee759e38531..9e3640cad84d9cf99e92eabf6d6c1e5369d896d2 100644 (file)
@@ -136,11 +136,9 @@ static void save_cylinder_info(FILE *f, struct dive *dive)
                        return;
                fprintf(f, "  <cylinder");
                if (o2) {
-                       int n2 = 1000 - o2 - he;
                        fprintf(f, " o2='%u.%u%%'", FRACTION(o2, 10));
                        if (he)
                                fprintf(f, " he='%u.%u%%'", FRACTION(he, 10));
-                       fprintf(f, " n2='%u.%u%%'", FRACTION(n2, 10));
                }
                if (volume) {
                        fprintf(f, " size='%u.%03u l'", FRACTION(volume, 1000));