]> jfr.im git - solanum.git/blobdiff - librb/src/linebuf.c
librb: linebuf: don't reinvent rb_dlinkAddTailAlloc().
[solanum.git] / librb / src / linebuf.c
index f14d4a9826d49cc080aebd1eb7184c2dc1dd7d89..33977f808783fd14e4a5bdbfc957b1f5c2262f7a 100644 (file)
@@ -72,18 +72,14 @@ static buf_line_t *
 rb_linebuf_new_line(buf_head_t * bufhead)
 {
        buf_line_t *bufline;
-       rb_dlink_node *node;
 
        bufline = rb_linebuf_allocate();
        if(bufline == NULL)
                return NULL;
        ++bufline_count;
 
-
-       node = rb_make_rb_dlink_node();
-
        /* Stick it at the end of the buf list */
-       rb_dlinkAddTail(bufline, node, &bufhead->list);
+       rb_dlinkAddTailAlloc(bufline, &bufhead->list);
        bufline->refcount++;
 
        /* And finally, update the allocated size */