]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-tests: Fix signed/unsigned comparison by using constant
authorMartin Schwenke <martin@meltin.net>
Wed, 22 May 2019 11:58:46 +0000 (21:58 +1000)
committerAmitay Isaacs <amitay@samba.org>
Wed, 5 Jun 2019 10:25:50 +0000 (10:25 +0000)
Variable reqid is unsigned, so don't compare with -1.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/src/reqid_test.c

index 39f1fbdcc691af1e414917fc3ac80e489304e6bc..fe2a84ee5518ec94b5875ee8e8905d964a7ab7c5 100644 (file)
@@ -40,7 +40,7 @@ int main(void)
 
        for (i=0; i<1024*1024; i++) {
                reqid = reqid_new(reqid_ctx, data);
-               assert(reqid != -1);
+               assert(reqid != REQID_INVALID);
        }
 
        for (i=0; i<1024; i++) {