summaryrefslogtreecommitdiffstats
path: root/save-xml.c
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-09-12 13:41:37 -0700
committerGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-09-12 13:41:37 -0700
commit574a5b808fc01f8a830ef3dd74bd635313749b3f (patch)
treeba5e0571ce8efb3e3a40bd48175db4761f03418f /save-xml.c
parent4e7161efd6738cc50c3879846b5df7d1d58c3c58 (diff)
downloadsubsurface-574a5b808fc01f8a830ef3dd74bd635313749b3f.tar.gz
Don't save empty cylinder descriptions in the xml
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>
Diffstat (limited to 'save-xml.c')
-rw-r--r--save-xml.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/save-xml.c b/save-xml.c
index a9800d001..91ead9f1d 100644
--- a/save-xml.c
+++ b/save-xml.c
@@ -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='", "'");