From 476cf3337d79e5ed279aab33abb866ad48a39664 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 3 Jul 2013 09:30:02 +0200 Subject: [PATCH] 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. --- src/strrb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/strrb.c b/src/strrb.c index b137acb83..a36205abc 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);