Mercurial > pidgin.yaz
comparison libpurple/protocols/yahoo/yahoo_packet.c @ 27773:0f3a131d23da
- import nosuke's hash 244 patch and others to yahoo plugin
- do not perform any conversion in sanitize_* if _WIN32 defined
- suppress warning as much as possible
- fix indentation
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Fri, 29 Feb 2008 17:56:13 +0000 |
parents | 98604b4bfa3b |
children | 84d01400c3f0 |
comparison
equal
deleted
inserted
replaced
27772:839cc551cad9 | 27773:0f3a131d23da |
---|---|
54 void yahoo_packet_hash_int(struct yahoo_packet *pkt, int key, int value) | 54 void yahoo_packet_hash_int(struct yahoo_packet *pkt, int key, int value) |
55 { | 55 { |
56 struct yahoo_pair *pair; | 56 struct yahoo_pair *pair; |
57 | 57 |
58 g_return_if_fail(pkt != NULL); | 58 g_return_if_fail(pkt != NULL); |
59 g_return_if_fail(value != NULL); | 59 g_return_if_fail(value != 0); |
60 | 60 |
61 pair = g_new0(struct yahoo_pair, 1); | 61 pair = g_new0(struct yahoo_pair, 1); |
62 pair->key = key; | 62 pair->key = key; |
63 pair->value = g_strdup_printf("%d", value); | 63 pair->value = g_strdup_printf("%d", value); |
64 pkt->hash = g_slist_prepend(pkt->hash, pair); | 64 pkt->hash = g_slist_prepend(pkt->hash, pair); |
388 | 388 |
389 int yahoo_packet_send_and_free(struct yahoo_packet *pkt, struct yahoo_data *yd) | 389 int yahoo_packet_send_and_free(struct yahoo_packet *pkt, struct yahoo_data *yd) |
390 { | 390 { |
391 int ret; | 391 int ret; |
392 | 392 |
393 g_return_if_fail(pkt != NULL); | 393 g_return_val_if_fail(pkt != NULL, 0); |
394 g_return_if_fail(yd != NULL); | 394 g_return_val_if_fail(yd != NULL, 0); |
395 | 395 |
396 ret = yahoo_packet_send(pkt, yd); | 396 ret = yahoo_packet_send(pkt, yd); |
397 yahoo_packet_free(pkt); | 397 yahoo_packet_free(pkt); |
398 return ret; | 398 return ret; |
399 } | 399 } |