Improve hbuf_remove_receipt() efficiency
Do not use g_list_first() (that is, start searching from the bottom of
the buffer).
--- a/mcabber/mcabber/hbuf.c Mon Mar 22 22:39:47 2010 +0100
+++ b/mcabber/mcabber/hbuf.c Mon Mar 22 23:39:01 2010 +0100
@@ -485,9 +485,9 @@
{
hbuf_block *blk;
- hbuf = g_list_first(hbuf);
+ hbuf = g_list_last(hbuf);
- for ( ; hbuf; hbuf = g_list_next(hbuf)) {
+ for ( ; hbuf; hbuf = g_list_previous(hbuf)) {
blk = (hbuf_block*)(hbuf->data);
if (blk->prefix.xep184 == xep184) {
blk->prefix.xep184 = NULL;