]> jfr.im git - solanum.git/commitdiff
librb: linebuf: don't reinvent rb_dlinkAddTailAlloc().
authorWilliam Pitcock <redacted>
Sat, 30 Apr 2016 05:58:39 +0000 (00:58 -0500)
committerWilliam Pitcock <redacted>
Sat, 30 Apr 2016 05:59:08 +0000 (00:59 -0500)
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 */