From 574a5b808fc01f8a830ef3dd74bd635313749b3f Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Mon, 12 Sep 2011 13:41:37 -0700 Subject: [PATCH] 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 --- save-xml.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/save-xml.c b/save-xml.c index a9800d0..91ead9f 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='", "'"); -- 2.43.0