Mercurial > pidgin.yaz
changeset 32123:17f7badf147e
oscar: Avoid a few printf("%s", NULL)s
Thanks to clh and dustin.
Fixes #14295, #14297.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Sat, 18 Jun 2011 02:01:30 +0000 |
parents | 84152881ad5d |
children | 2f74d4c0e63a |
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 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)"); } /**
--- 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);