Remove comparisons that can never evaluate to true
authorDan Scott <dan@coffeecode.net>
Sat, 5 May 2012 05:58:22 +0000 (01:58 -0400)
committerDan Scott <dan@coffeecode.net>
Tue, 22 May 2012 05:54:41 +0000 (01:54 -0400)
commitbc8e92948bc15854d393e16bcf995b2ad99ccfb4
treee5b901adab202c5f655efa79f066adb5637ff1b5
parentf56b12a2026fd02b5770fe8c9a39ad2b6eecf34c
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