Mercurial > pidgin
diff libgaim/protocols/qq/group_search.c @ 14519:e548832f0e82
[gaim-migrate @ 17239]
We don't need to dynamically allocate all of these buffers.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Huetsch <markhuetsch> |
---|---|
date | Mon, 11 Sep 2006 02:02:18 +0000 |
parents | a85299caf0c3 |
children | 6b8bc59414f0 |
line wrap: on
line diff
--- a/libgaim/protocols/qq/group_search.c Mon Sep 11 01:57:20 2006 +0000 +++ b/libgaim/protocols/qq/group_search.c Mon Sep 11 02:02:18 2006 +0000 @@ -64,28 +64,22 @@ static void _qq_setup_roomlist(qq_data *qd, qq_group *group) { GaimRoomlistRoom *room; - gchar *field; + gchar field[11]; room = gaim_roomlist_room_new(GAIM_ROOMLIST_ROOMTYPE_ROOM, group->group_name_utf8, NULL); - field = g_strdup_printf("%d", group->external_group_id); + g_snprintf(field, sizeof(field), "%d", group->external_group_id); gaim_roomlist_room_add_field(qd->roomlist, room, field); - g_free(field); - field = g_strdup_printf("%d", group->creator_uid); + g_snprintf(field, sizeof(field), "%d", group->creator_uid); gaim_roomlist_room_add_field(qd->roomlist, room, field); - g_free(field); gaim_roomlist_room_add_field(qd->roomlist, room, group->group_desc_utf8); - field = g_strdup_printf("%d", group->internal_group_id); + g_snprintf(field, sizeof(field), "%d", group->internal_group_id); gaim_roomlist_room_add_field(qd->roomlist, room, field); - g_free(field); - field = g_strdup_printf("%d", group->group_type); + g_snprintf(field, sizeof(field), "%d", group->group_type); gaim_roomlist_room_add_field(qd->roomlist, room, field); - g_free(field); - field = g_strdup_printf("%d", group->auth_type); + g_snprintf(field, sizeof(field), "%d", group->auth_type); gaim_roomlist_room_add_field(qd->roomlist, room, field); - g_free(field); - field = g_strdup_printf("%d", group->group_category); + g_snprintf(field, sizeof(field), "%d", group->group_category); gaim_roomlist_room_add_field(qd->roomlist, room, field); - g_free(field); gaim_roomlist_room_add_field(qd->roomlist, room, group->group_name_utf8); gaim_roomlist_room_add(qd->roomlist, room);