summaryrefslogtreecommitdiff
path: root/source4/lib/socket
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-04-13 22:00:36 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-04-13 22:00:36 +0200
commit148d3b170ae00d4001fa011450c7238052d32ae2 (patch)
tree02eb3175d46a335ede787049caa1de1c563f20ca /source4/lib/socket
parentae553dfcecdd605658dea73ccb6e577b059f478c (diff)
downloadsamba-148d3b170ae00d4001fa011450c7238052d32ae2.tar.gz
samba-148d3b170ae00d4001fa011450c7238052d32ae2.tar.bz2
samba-148d3b170ae00d4001fa011450c7238052d32ae2.zip
Use torture_assert_mem_equal() in a couple more places.
(This used to be commit e2c3fab9d1bf0482c15a115e7d373562ffe50b29)
Diffstat (limited to 'source4/lib/socket')
-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;
}