]> git.evergreen-ils.org Git - OpenSRF.git/commit
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:57:32 +0000 (01:57 -0400)
commitbdc4cfe354051e4132d6ffa2da3e0942acb3f780
treedb55f1b2517e2afe3e872f94b377b5f4f9170f31
parent3aabf1932f93bc6e1e6693001734a1f1bcdbdce0
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