diff options
author | Volker Lendecke <vl@samba.org> | 2016-12-31 12:45:51 +0000 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2017-01-03 19:56:17 +0100 |
commit | 98bcdca632c7e508af2ecb3e8d6e005d04523c83 (patch) | |
tree | 578f95ecd0d78134c43a3f739c6268734e8dd1a3 /source4/torture/rpc/netlogon.c | |
parent | 015a41a5e358849bc5960f9bc7714f751ad0f7b7 (diff) | |
download | samba-98bcdca632c7e508af2ecb3e8d6e005d04523c83.tar.gz |
torture-netlogon: Use "all_zero" where appropriate
... Saves a few bytes of footprint
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Jan 3 19:56:17 CET 2017 on sn-devel-144
Diffstat (limited to 'source4/torture/rpc/netlogon.c')
-rw-r--r-- | source4/torture/rpc/netlogon.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c index 1d24f07858c..455fce611ae 100644 --- a/source4/torture/rpc/netlogon.c +++ b/source4/torture/rpc/netlogon.c @@ -932,7 +932,6 @@ static bool test_netlogon_ops_args(struct dcerpc_pipe *p, struct torture_context NTSTATUS status; struct netr_LogonSamLogon r; struct netr_Authenticator auth, auth2; - static const struct netr_Authenticator auth_zero; union netr_LogonLevel logon; union netr_Validation validation; uint8_t authoritative; @@ -1032,7 +1031,7 @@ static bool test_netlogon_ops_args(struct dcerpc_pipe *p, struct torture_context torture_assert_int_equal(tctx, *r.out.authoritative, 1, "LogonSamLogon invalid *r.out.authoritative"); torture_assert(tctx, - memcmp(&auth2, &auth_zero, sizeof(auth2)) == 0, + all_zero((uint8_t *)&auth2, sizeof(auth2)), "Return authenticator non zero"); } @@ -1070,7 +1069,7 @@ static bool test_netlogon_ops_args(struct dcerpc_pipe *p, struct torture_context "LogonSamLogon expected INVALID_PARAMETER"); torture_assert(tctx, - memcmp(&auth2, &auth_zero, sizeof(auth2)) == 0, + all_zero((uint8_t *)&auth2, sizeof(auth2)), "Return authenticator non zero"); torture_assert_int_equal(tctx, *r.out.authoritative, 1, "LogonSamLogon invalid *r.out.authoritative"); @@ -1091,7 +1090,7 @@ static bool test_netlogon_ops_args(struct dcerpc_pipe *p, struct torture_context "LogonSamLogon expected INVALID_PARAMETER"); torture_assert(tctx, - memcmp(&auth2, &auth_zero, sizeof(auth2)) == 0, + all_zero((uint8_t *)&auth2, sizeof(auth2)), "Return authenticator non zero"); torture_assert_int_equal(tctx, *r.out.authoritative, 1, "LogonSamLogon invalid *r.out.authoritative"); |