summaryrefslogtreecommitdiff
path: root/source4/lib/socket/testsuite.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/socket/testsuite.c')
-rw-r--r--source4/lib/socket/testsuite.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/lib/socket/testsuite.c b/source4/lib/socket/testsuite.c
index 6d4d81a884..813412c7bc 100644
--- a/source4/lib/socket/testsuite.c
+++ b/source4/lib/socket/testsuite.c
@@ -86,7 +86,7 @@ static bool test_udp(struct torture_context *tctx)
torture_assert_int_equal(tctx, nread, size, "Unexpected recvfrom size");
- torture_assert(tctx, memcmp(blob2.data, blob.data, size) == 0,
+ torture_assert_mem_equal(tctx, blob2.data, blob.data, size,
"Bad data in recvfrom");
generate_random_buffer(blob.data, blob.length);
@@ -104,7 +104,7 @@ static bool test_udp(struct torture_context *tctx)
torture_assert_int_equal(tctx, from_addr->port, srv_addr->port,
"Unexpected recvfrom port");
- torture_assert(tctx, memcmp(blob2.data, blob.data, size) == 0,
+ torture_assert_mem_equal(tctx, blob2.data, blob.data, size,
"Bad data in recvfrom");
talloc_free(sock1);
@@ -181,7 +181,7 @@ static bool test_tcp(struct torture_context *tctx)
torture_assert_int_equal(tctx, nread, size, "Unexpected recvfrom size");
- torture_assert(tctx, memcmp(blob2.data, blob.data, size) == 0,
+ torture_assert_mem_equal(tctx, blob2.data, blob.data, size,
"Bad data in recv");
return true;
}