diff options
author | Andrew Bartlett <abartlet@samba.org> | 2021-04-20 07:34:12 +1200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2021-04-28 03:43:34 +0000 |
commit | 225fefe6cf8f1c0292f13104c7b51c3397b941ae (patch) | |
tree | 03ff46f28bef5d8635c9a012bee1afda3b28899a /source4 | |
parent | b5984c3da0f799368f739083a2d9f331e1a4e368 (diff) | |
download | samba-225fefe6cf8f1c0292f13104c7b51c3397b941ae.tar.gz |
torture: Avoid -Werror=strict-overflow in -O3 coverage build
The test_getinfo() function only needs to return if this happens
not how many times.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/torture/rpc/dsgetinfo.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/source4/torture/rpc/dsgetinfo.c b/source4/torture/rpc/dsgetinfo.c index 4e9e5833f02..58a2f921fbe 100644 --- a/source4/torture/rpc/dsgetinfo.c +++ b/source4/torture/rpc/dsgetinfo.c @@ -248,7 +248,7 @@ static bool test_getinfo(struct torture_context *tctx, union drsuapi_DsReplicaInfo info; enum drsuapi_DsReplicaInfoType info_type; int i; - int invalid_levels = 0; + bool no_invalid_levels = true; struct { int32_t level; int32_t infotype; @@ -382,18 +382,14 @@ static bool test_getinfo(struct torture_context *tctx, torture_comment(tctx, "DsReplicaGetInfo level %d and/or infotype %d not yet supported by server\n", array[i].level, array[i].infotype); - invalid_levels++; + no_invalid_levels = false; continue; } torture_drsuapi_assert_call(tctx, p, status, &r, "dcerpc_drsuapi_DsReplicaGetInfo"); } - if (invalid_levels > 0) { - return false; - } - - return true; + return no_invalid_levels; } /** |