Remove comparisons that can never evaluate to true user/dbs/lp954059_compiler_warnings
authorDan Scott <dan@coffeecode.net>
Sat, 5 May 2012 05:58:22 +0000 (01:58 -0400)
committerDan Scott <dan@coffeecode.net>
Sat, 5 May 2012 05:58:22 +0000 (01:58 -0400)
commitc6cabec4ae0a7528f69be2656fbf799b07acca1e
treef1301cb40b6449b5399ce625672ea05eed920745
parenta874df960428c98906b55b2c876714cced8f1eec
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>
src/libopensrf/osrf_list.c