librb: rb_rawbuf_length: do something if soft assert fails
correct the value of rb->len
This commit is contained in:
parent
108699df3c
commit
2100c58d09
1 changed files with 2 additions and 2 deletions
|
@ -269,8 +269,8 @@ rb_rawbuf_get(rawbuf_head_t * rb, void *data, int len)
|
|||
int
|
||||
rb_rawbuf_length(rawbuf_head_t * rb)
|
||||
{
|
||||
if(rb_dlink_list_length(&rb->list) == 0 && rb->len != 0)
|
||||
lrb_assert(1 == 0);
|
||||
if (rb_dlink_list_length(&rb->list) == 0 && lrb_assert(rb->len == 0))
|
||||
rb->len = 0;
|
||||
return rb->len;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue