]> granicus.if.org Git - libevent/commitdiff
test/regress_buffer: fix clang compilation warnings
authorAzat Khuzhin <a3at.mail@gmail.com>
Thu, 8 Oct 2015 22:53:40 +0000 (01:53 +0300)
committerAzat Khuzhin <a3at.mail@gmail.com>
Thu, 8 Oct 2015 22:55:54 +0000 (01:55 +0300)
  ../test/regress_buffer.c:201:12: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
          tt_assert(!memcmp((char*)EVBUFFER_DATA(evb), "1/hello", 7) != 0);

test/regress_buffer.c

index fdaaac4c490b412787e6d4f653aa0d6f90761fdd..957e59f1785af4648d9d51d3e8faea19f362aa06 100644 (file)
@@ -198,7 +198,7 @@ test_evbuffer(void *ptr)
 
        tt_assert(evbuffer_get_length(evb_two) == 0);
        tt_assert(evbuffer_get_length(evb) == 7);
-       tt_assert(!memcmp((char*)EVBUFFER_DATA(evb), "1/hello", 7) != 0);
+       tt_assert(!memcmp((char*)EVBUFFER_DATA(evb), "1/hello", 7));
 
        memset(buffer, 0, sizeof(buffer));
        evbuffer_add(evb, buffer, sizeof(buffer));