ctdb-tests: Don't compare an unsigned value with -1
authorMartin Schwenke <martin@meltin.net>
Fri, 21 Jun 2019 04:41:38 +0000 (14:41 +1000)
committerAmitay Isaacs <amitay@samba.org>
Fri, 5 Jul 2019 05:03:23 +0000 (05:03 +0000)
The dummy reader should never be called, so contains an assert on the
buffer length that should always trigger.  Just abort() instead.

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

index d0e424f562052348a05f0ebaf37bdc93df11b8d2..ba4b6377d6d8b45722dd08b939eee6269cfa0c6d 100644 (file)
@@ -178,7 +178,7 @@ static void test2_reader(int fd)
 static void test2_dummy_reader(uint8_t *buf, size_t buflen,
                               void *private_data)
 {
-       assert(buflen == -1);
+       abort();
 }
 
 static void test2_writer(struct sock_queue *queue)