Don't bother saving n2 percentage

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>
This commit is contained in:
Linus Torvalds 2011-09-03 20:50:11 -07:00
parent 3a04342607
commit 6fd86ab6b7

View file

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