# HG changeset patch # User Sadrul Habib Chowdhury # Date 1195681608 0 # Node ID 5c74661025dc443071386224e5f732c9a0fd668d # Parent 2c45b94ab72228b0d03605f6fc57ca084377ea11 disapproval of revision '91ae77ce12a4ab3798e303eea54d3bef749d5ca5' diff -r 2c45b94ab722 -r 5c74661025dc libpurple/protocols/yahoo/yahoo_packet.c --- a/libpurple/protocols/yahoo/yahoo_packet.c Wed Nov 21 08:29:33 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo_packet.c Wed Nov 21 21:46:48 2007 +0000 @@ -219,15 +219,16 @@ void yahoo_packet_write(struct yahoo_packet *pkt, guchar *data) { + GSList *l = pkt->hash; int pos = 0; /* This is only called from one place, and the list is * always backwards */ - pkt->hash = g_slist_reverse(pkt->hash); + l = g_slist_reverse(l); - while (pkt->hash) { - struct yahoo_pair *pair = pkt->hash->data; + while (l) { + struct yahoo_pair *pair = l->data; gchar buf[100]; g_snprintf(buf, sizeof(buf), "%d", pair->key); @@ -241,7 +242,7 @@ data[pos++] = 0xc0; data[pos++] = 0x80; - pkt->hash = pkt->hash->next; + l = l->next; } }