]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
torture-dfs: Use "all_zero" where appropriate
authorVolker Lendecke <vl@samba.org>
Sat, 31 Dec 2016 12:45:51 +0000 (12:45 +0000)
committerRalph Boehme <slow@samba.org>
Tue, 3 Jan 2017 15:04:29 +0000 (16:04 +0100)
... Saves a few bytes of footprint

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source4/torture/dfs/domaindfs.c

index 4981d0f11ee17f3265226a4a6a715e9a04a3ca65..ee884f1860ee81a58c40139d0c4a29b6bb1cb3d3 100644 (file)
@@ -307,9 +307,6 @@ static bool test_getsysvolreferral(struct torture_context *tctx,
        const char* str;
        struct dfs_GetDFSReferral r, r2, r3;
        struct dfs_referral_resp resp, resp2, resp3;
-       uint8_t zeros[16];
-
-       memset(zeros, 0, sizeof(zeros));
 
        r.in.req.max_referral_level = 3;
        r.in.req.servername = "";
@@ -394,8 +391,8 @@ static bool test_getsysvolreferral(struct torture_context *tctx,
                                 talloc_asprintf(tctx,
                                        "Not expected version for referral entry 0 got %d expected 4",
                                        resp3.referral_entries[0].version));
-       torture_assert_int_equal(tctx, memcmp(resp3.referral_entries[0].referral.v3.service_site_guid.value, zeros, 16), 0,
-                                talloc_asprintf(tctx,
+       torture_assert(tctx, all_zero(resp3.referral_entries[0].referral.v3.service_site_guid.value, 16),
+                      talloc_asprintf(tctx,
                                        "Service_site_guid is not NULL as expected"));
 #if 0
        /* Shouldn't be needed anymore*/