# HG changeset patch # User Mikael Berthe # Date 1130666972 -7200 # Node ID 3134b4960cdb968c04181473c7960d434accb657 # Parent 7c1ca00070e8f9118674ee5c3a5bd1bdd3ec0765 Fix mixed declaration and code diff -r 7c1ca00070e8 -r 3134b4960cdb mcabber/src/hbuf.c --- a/mcabber/src/hbuf.c Wed Oct 26 23:46:53 2005 +0200 +++ b/mcabber/src/hbuf.c Sun Oct 30 12:09:32 2005 +0200 @@ -67,10 +67,11 @@ hbuf_block_elt->ptr_end_alloc = hbuf_block_elt->ptr + HBB_BLOCKSIZE; *p_hbuf = g_list_append(*p_hbuf, hbuf_block_elt); } else { + hbuf_block *hbuf_b_prev; // Set p_hbuf to the end of the list, to speed up history loading // (or CPU time will be used by g_list_last() for each line) hbuf = *p_hbuf = g_list_last(*p_hbuf); - hbuf_block *hbuf_b_prev = hbuf->data; + hbuf_b_prev = hbuf->data; hbuf_block_elt->ptr = hbuf_b_prev->ptr_end; hbuf_block_elt->flags = HBB_FLAG_PERSISTENT; hbuf_block_elt->ptr_end_alloc = hbuf_b_prev->ptr_end_alloc;