mirror of https://gerrit.osmocom.org/libosmocore
strrb: Remove a tautology from the code
This already came up during review but now that Coverity complains about it as well, let us just remove it. The variable is unsigned so it can never be < 0. Fixes: Coverity CID 1040669.
This commit is contained in:
parent
b3b955bef2
commit
476cf3337d
|
@ -118,7 +118,7 @@ bool _osmo_strrb_is_bufindex_valid(const struct osmo_strrb *rb,
|
|||
{
|
||||
if (osmo_strrb_is_empty(rb))
|
||||
return 0;
|
||||
if ((bufi >= rb->size) || (bufi < 0))
|
||||
if (bufi >= rb->size)
|
||||
return 0;
|
||||
if (rb->start < rb->end)
|
||||
return (bufi >= rb->start) && (bufi < rb->end);
|
||||
|
|
Loading…
Reference in New Issue