# HG changeset patch # User Paul Aurich # Date 1308362490 0 # Node ID 17f7badf147e46bbbcd96dab34f8069f8bfffd7f # Parent 84152881ad5d042a2dc46231046b559adbd60c6f oscar: Avoid a few printf("%s", NULL)s Thanks to clh and dustin. Fixes #14295, #14297. diff -r 84152881ad5d -r 17f7badf147e libpurple/protocols/oscar/family_feedbag.c --- a/libpurple/protocols/oscar/family_feedbag.c Tue Jun 14 01:08:49 2011 +0000 +++ b/libpurple/protocols/oscar/family_feedbag.c Sat Jun 18 02:01:30 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)"); } /** diff -r 84152881ad5d -r 17f7badf147e libpurple/protocols/oscar/oscar.c --- a/libpurple/protocols/oscar/oscar.c Tue Jun 14 01:08:49 2011 +0000 +++ b/libpurple/protocols/oscar/oscar.c Sat Jun 18 02:01:30 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);