]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Don't save empty cylinder descriptions in the xml
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 12 Sep 2011 20:41:37 +0000 (13:41 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 12 Sep 2011 20:41:37 +0000 (13:41 -0700)
They get created when the equipment thing doesn't have a name for the
cylinder, but we don't want to save that lack of description.

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

index a9800d001ea0e97d9f504ef377ccd4211b9df238..91ead9f1d6d6eab18cdc093f559dedb1a8785408 100644 (file)
@@ -181,7 +181,7 @@ static void save_cylinder_info(FILE *f, struct dive *dive)
                if (volume)
                        show_milli(f, " size='", volume, " l", "'");
                show_pressure(f, cylinder->type.workingpressure, " workpressure='", "'");
-               if (description)
+               if (description && *description)
                        fprintf(f, " description='%s'", description);
                show_pressure(f, cylinder->start, " start='", "'");
                show_pressure(f, cylinder->end, " end='", "'");