]> git.tdb.fi Git - ext/subsurface.git/blobdiff - save-xml.c
Oops. I forgot to 'fclose()' the file after saving the xml
[ext/subsurface.git] / save-xml.c
index 309f7cc08c452c28283e415b7028aee759e38531..5c05723b71e1ebf5df39a0c9f977d6d0f6ccb6e5 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));
@@ -195,4 +193,5 @@ void save_dives(const char *filename)
        for (i = 0; i < dive_table.nr; i++)
                save_dive(f, get_dive(i));
        fprintf(f, "</dives>\n");
+       fclose(f);
 }