librb: linebuf: don't reinvent rb_dlinkAddTailAlloc().
This commit is contained in:
parent
9f7f75295c
commit
a2bfe0f88e
1 changed files with 1 additions and 5 deletions
|
@ -72,18 +72,14 @@ static buf_line_t *
|
||||||
rb_linebuf_new_line(buf_head_t * bufhead)
|
rb_linebuf_new_line(buf_head_t * bufhead)
|
||||||
{
|
{
|
||||||
buf_line_t *bufline;
|
buf_line_t *bufline;
|
||||||
rb_dlink_node *node;
|
|
||||||
|
|
||||||
bufline = rb_linebuf_allocate();
|
bufline = rb_linebuf_allocate();
|
||||||
if(bufline == NULL)
|
if(bufline == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
++bufline_count;
|
++bufline_count;
|
||||||
|
|
||||||
|
|
||||||
node = rb_make_rb_dlink_node();
|
|
||||||
|
|
||||||
/* Stick it at the end of the buf list */
|
/* Stick it at the end of the buf list */
|
||||||
rb_dlinkAddTail(bufline, node, &bufhead->list);
|
rb_dlinkAddTailAlloc(bufline, &bufhead->list);
|
||||||
bufline->refcount++;
|
bufline->refcount++;
|
||||||
|
|
||||||
/* And finally, update the allocated size */
|
/* And finally, update the allocated size */
|
||||||
|
|
Loading…
Reference in a new issue