Mercurial > pidgin
changeset 14260:accae094598f
[gaim-migrate @ 16942]
This was warning marv
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 21 Aug 2006 04:54:11 +0000 |
parents | 0ac0f16aa006 |
children | bb060cdc23d1 |
files | libgaim/protocols/yahoo/yahoo_packet.c |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libgaim/protocols/yahoo/yahoo_packet.c Mon Aug 21 04:42:11 2006 +0000 +++ b/libgaim/protocols/yahoo/yahoo_packet.c Mon Aug 21 04:54:11 2006 +0000 @@ -113,7 +113,8 @@ void yahoo_packet_read(struct yahoo_packet *pkt, const guchar *data, int len) { int pos = 0; - char key[64], *delimiter; + char key[64]; + const guchar *delimiter; gboolean accept; int x; struct yahoo_pair *pair; @@ -160,7 +161,7 @@ } if (accept) { - delimiter = strstr((char *)&data[pos], "\xc0\x80"); + delimiter = (const guchar *)strstr((char *)&data[pos], "\xc0\x80"); if (delimiter == NULL) { /* Malformed packet! (it doesn't end in 0xc0 0x80) */ @@ -168,7 +169,7 @@ pos = len; continue; } - x = (guint64)delimiter - (guint64)data; + x = delimiter - data; pair->value = g_strndup((const gchar *)&data[pos], x - pos); pos = x; pkt->hash = g_slist_prepend(pkt->hash, pair);