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>
This commit is contained in:
Linus Torvalds 2011-09-12 13:41:37 -07:00
parent 4e7161efd6
commit 574a5b808f

View 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='", "'");