changeset 31690:3ff91e34691d

applied changes from 00c6d11a264a02d1aaa23feb52eab5ca46e655c8 through d4ad4dcf4f618793c9201ace11269bac63645d69 Original commit message: oscar: Avoid a few printf("%s", NULL)s Thanks to clh and dustin. Fixes #14295, #14297.
author Mark Doliner <mark@kingant.net>
date Mon, 20 Jun 2011 05:32:19 +0000
parents 855a539dcec7
children 88241dbf2a6b
files libpurple/protocols/oscar/family_feedbag.c libpurple/protocols/oscar/oscar.c
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/oscar/family_feedbag.c	Mon Jun 20 05:31:28 2011 +0000
+++ b/libpurple/protocols/oscar/family_feedbag.c	Mon Jun 20 05:32:19 2011 +0000
@@ -100,7 +100,8 @@
 {
 	g_string_append_printf(str, 
 		"%s gid=0x%04hx, bid=0x%04hx, list_type=0x%04hx [%s], name=%s.\n",
-		prefix, item->gid, item->bid, item->type, aim_ssi_type_to_string(item->type), item->name);
+		prefix, item->gid, item->bid, item->type, aim_ssi_type_to_string(item->type),
+		item->name ? item->name : "(null)");
 }
 
 /**
--- a/libpurple/protocols/oscar/oscar.c	Mon Jun 20 05:31:28 2011 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Mon Jun 20 05:32:19 2011 +0000
@@ -1465,11 +1465,11 @@
 		} else if (previous_status != NULL && purple_status_is_available(previous_status)) {
 			itmsurl = g_strdup(purple_status_get_attr_string(previous_status, "itmsurl"));
 		}
-		purple_debug_info("oscar", "Activating status '%s' for buddy %s, message = '%s', itmsurl = '%s'\n", status_id, info->bn, message, itmsurl);
+		purple_debug_info("oscar", "Activating status '%s' for buddy %s, message = '%s', itmsurl = '%s'\n", status_id, info->bn, message ? message : "(null)", itmsurl ? itmsurl : "(null)");
 		purple_prpl_got_user_status(account, info->bn, status_id, "message", message, "itmsurl", itmsurl, NULL);
 	} else {
 		purple_debug_info("oscar", "Activating status '%s' for buddy %s, message = '%s'\n", status_id, info->bn, message);
-		purple_prpl_got_user_status(account, info->bn, status_id, "message", message, NULL);
+		purple_prpl_got_user_status(account, info->bn, status_id, "message", message ? message : "(null)", NULL);
 	}
 
 	g_free(message);