Remove comparisons that can never evaluate to true
authorDan Scott <dan@coffeecode.net>
Sat, 5 May 2012 05:58:22 +0000 (01:58 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 21 May 2012 21:34:36 +0000 (17:34 -0400)
commit528662a885cfc6fac2ac2eba217f04b1365def14
treeddb1d313ac2f9fa80690b0be7705150d3a6a3b2a
parent0c8d7360c3da2944dc49ad8ac4dfb44070d36214
Remove comparisons that can never evaluate to true

Using clang as the compiler results in 4 warnings like the following:

osrf_list.c:106:23: warning: comparison of unsigned expression < 0 is
always false [-Wtautological-compare]
        if(!list || position < 0) return NULL;
                    ~~~~~~~~ ^ ~

(Explanation: "position" is an unsigned int; thus the comparison to < 0
can never evaluate to true).

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
src/libopensrf/osrf_list.c