Mercurial > pidgin
comparison libgaim/protocols/yahoo/yahoo_packet.c @ 14259:0ac0f16aa006
[gaim-migrate @ 16941]
silence some warnings by casting several things to (char *) that are actually unsigned char *'s.
committer: Tailor Script <tailor@pidgin.im>
author | Tim Ringenbach <marv@pidgin.im> |
---|---|
date | Mon, 21 Aug 2006 04:42:11 +0000 |
parents | 60b1bc8dbf37 |
children | accae094598f |
comparison
equal
deleted
inserted
replaced
14258:cb2714fdf274 | 14259:0ac0f16aa006 |
---|---|
111 } | 111 } |
112 | 112 |
113 void yahoo_packet_read(struct yahoo_packet *pkt, const guchar *data, int len) | 113 void yahoo_packet_read(struct yahoo_packet *pkt, const guchar *data, int len) |
114 { | 114 { |
115 int pos = 0; | 115 int pos = 0; |
116 char key[64], *delimiter, *esc; | 116 char key[64], *delimiter; |
117 gboolean accept; | 117 gboolean accept; |
118 int x; | 118 int x; |
119 struct yahoo_pair *pair; | 119 struct yahoo_pair *pair; |
120 | 120 |
121 while (pos + 1 < len) | 121 while (pos + 1 < len) |
172 pair->value = g_strndup((const gchar *)&data[pos], x - pos); | 172 pair->value = g_strndup((const gchar *)&data[pos], x - pos); |
173 pos = x; | 173 pos = x; |
174 pkt->hash = g_slist_prepend(pkt->hash, pair); | 174 pkt->hash = g_slist_prepend(pkt->hash, pair); |
175 | 175 |
176 #ifdef DEBUG | 176 #ifdef DEBUG |
177 esc = g_strescape(pair->value, NULL); | 177 { |
178 gaim_debug(GAIM_DEBUG_MISC, "yahoo", | 178 char *esc; |
179 "Key: %d \tValue: %s\n", pair->key, esc); | 179 esc = g_strescape(pair->value, NULL); |
180 g_free(esc); | 180 gaim_debug(GAIM_DEBUG_MISC, "yahoo", |
181 "Key: %d \tValue: %s\n", pair->key, esc); | |
182 g_free(esc); | |
183 } | |
181 #endif | 184 #endif |
182 } else { | 185 } else { |
183 g_free(pair); | 186 g_free(pair); |
184 } | 187 } |
185 pos += 2; | 188 pos += 2; |