summaryrefslogtreecommitdiffstats
path: root/src/strrb.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-07-03 09:30:02 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-07-03 09:30:02 +0200
commit476cf3337d79e5ed279aab33abb866ad48a39664 (patch)
treedfcb340b44b496f856c7fe6a3e22cc12fcc1cf6a /src/strrb.c
parentb3b955bef2b7f95afa033c97e4c3df4b7e4b5568 (diff)
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.
Diffstat (limited to 'src/strrb.c')
-rw-r--r--src/strrb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/strrb.c b/src/strrb.c
index b137acb8..a36205ab 100644
--- a/src/strrb.c
+++ b/src/strrb.c
@@ -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);