Mercurial > pidgin.yaz
diff libpurple/protocols/oscar/family_feedbag.c @ 30826:bbb27d65681f
Bstream cleanups:
1. g_return_val_if_fail()'s in place of XXX's.
2. byte_stream_empty() -> byte_stream_bytes_left(). I think the world
is a better place now.
author | ivan.komarov@soc.pidgin.im |
---|---|
date | Wed, 28 Jul 2010 23:53:25 +0000 |
parents | 420907755a2f |
children | 11c54d781835 |
line wrap: on
line diff
--- a/libpurple/protocols/oscar/family_feedbag.c Wed Jul 28 23:13:25 2010 +0000 +++ b/libpurple/protocols/oscar/family_feedbag.c Wed Jul 28 23:53:25 2010 +0000 @@ -1170,7 +1170,7 @@ od->ssi.numitems += byte_stream_get16(bs); /* # of items in this SSI SNAC */ /* Read in the list */ - while (byte_stream_empty(bs) > 4) { /* last four bytes are timestamp */ + while (byte_stream_bytes_left(bs) > 4) { /* last four bytes are timestamp */ if ((namelen = byte_stream_get16(bs))) name = byte_stream_getstr(bs, namelen); else @@ -1288,7 +1288,7 @@ guint16 len, gid, bid, type; GSList *data; - while (byte_stream_empty(bs)) { + while (byte_stream_bytes_left(bs)) { if ((len = byte_stream_get16(bs))) name = byte_stream_getstr(bs, len); else @@ -1326,7 +1326,7 @@ GSList *data; struct aim_ssi_item *item; - while (byte_stream_empty(bs)) { + while (byte_stream_bytes_left(bs)) { if ((len = byte_stream_get16(bs))) name = byte_stream_getstr(bs, len); else @@ -1378,7 +1378,7 @@ guint16 gid, bid; struct aim_ssi_item *del; - while (byte_stream_empty(bs)) { + while (byte_stream_bytes_left(bs)) { byte_stream_advance(bs, byte_stream_get16(bs)); gid = byte_stream_get16(bs); bid = byte_stream_get16(bs); @@ -1411,7 +1411,7 @@ /* Read in the success/failure flags from the ack SNAC */ cur = od->ssi.pending; - while (cur && (byte_stream_empty(bs)>0)) { + while (cur && (byte_stream_bytes_left(bs)>0)) { cur->ack = byte_stream_get16(bs); cur = cur->next; }