From: Linus Torvalds Date: Mon, 12 Sep 2011 20:41:37 +0000 (-0700) Subject: Don't save empty cylinder descriptions in the xml X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=574a5b808fc01f8a830ef3dd74bd635313749b3f;hp=4e7161efd6738cc50c3879846b5df7d1d58c3c58;p=ext%2Fsubsurface.git 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 --- 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='", "'");