From 3b136f23ee4f3ddee1c157dfee2ff84fe6fa130e Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 28 Dec 2012 08:38:47 -0800 Subject: Make add_dc_to_string() skip redundant entries There is no point writing out divecomputer nicknames that do not exist (or that match the dive computer model), so don't. Also, make the function to do this static to save-xml.c, which is the only user (I initially didn't _find_ the function to create the XML string because it was illogically hidden in gtk-gui.c), and change the calling convention to be more direct (pass in a string and return a result, rather than modify a "pointer to string"). Signed-off-by: Linus Torvalds Signed-off-by: Dirk Hohndel --- dive.h | 1 - 1 file changed, 1 deletion(-) (limited to 'dive.h') diff --git a/dive.h b/dive.h index b77a08468..1191ec6b6 100644 --- a/dive.h +++ b/dive.h @@ -530,7 +530,6 @@ extern void flush_divelist(struct dive *dive); extern void set_dc_nickname(struct dive *dive); extern const char *get_dc_nickname(const char *model, uint32_t deviceid); extern void remember_dc(const char *model, uint32_t deviceid, const char *nickname, gboolean change_conf); -extern void add_dc_to_string(char **dc_xml, struct divecomputer *dc); #define DIVE_ERROR_PARSE 1 -- cgit v1.2.3-70-g09d2