pidgin: e5493323: Use safe function.

sadrul at pidgin.im sadrul at pidgin.im
Thu Apr 23 16:05:41 EDT 2009


-----------------------------------------------------------------
Revision: e54933232e44b0c259cee6eff8f9354e6b94fe5d
Ancestor: aa7ce93329f5ccbe74640a92b6656ae402d8eea8
Author: sadrul at pidgin.im
Date: 2009-04-23T20:05:26
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/e54933232e44b0c259cee6eff8f9354e6b94fe5d

Modified files:
        finch/gntblist.c finch/gntnotify.c

ChangeLog: 

Use safe function.

-------------- next part --------------
============================================================
--- finch/gntblist.c	404ab463993fd367b2bd594e1c29a9048eb23cbf
+++ finch/gntblist.c	65a72670877e66b083d13b0addc6a1e48c8b1220
@@ -935,7 +935,7 @@ get_display_name(PurpleBlistNode *node)
 	else if (PURPLE_BLIST_NODE_IS_GROUP(node))
 		return purple_group_get_name((PurpleGroup*)node);
 
-	snprintf(text, sizeof(text) - 1, "%s %s", status, name);
+	g_snprintf(text, sizeof(text) - 1, "%s %s", status, name);
 
 	return text;
 }
@@ -2642,7 +2642,7 @@ reconstruct_grouping_menu(void)
 		char menuid[128];
 		FinchBlistManager *manager = iter->data;
 		GntMenuItem *item = gnt_menuitem_new(_(manager->name));
-		snprintf(menuid, sizeof(menuid), "grouping-%s", manager->id);
+		g_snprintf(menuid, sizeof(menuid), "grouping-%s", manager->id);
 		gnt_menuitem_set_id(GNT_MENU_ITEM(item), menuid);
 		gnt_menu_add_item(GNT_MENU(subsub), item);
 		g_object_set_data_full(G_OBJECT(item), "grouping-id", g_strdup(manager->id), g_free);
============================================================
--- finch/gntnotify.c	c9f267524c4411e19306cfaa762b5d800b94873e
+++ finch/gntnotify.c	cf3e3c94710e7d18ed575a3b2d49ea9f3281ad07
@@ -263,7 +263,7 @@ userinfo_hash(PurpleAccount *account, co
 userinfo_hash(PurpleAccount *account, const char *who)
 {
 	char key[256];
-	snprintf(key, sizeof(key), "%s - %s", purple_account_get_username(account), purple_normalize(account, who));
+	g_snprintf(key, sizeof(key), "%s - %s", purple_account_get_username(account), purple_normalize(account, who));
 	return g_utf8_strup(key, -1);
 }
 


More information about the Commits mailing list