From: Günther Deschner Date: Mon, 13 Jan 2020 17:30:14 +0000 (+0100) Subject: s4-torture: fix asserts in clusapi_NodeControl tests X-Git-Tag: samba-4.12.0rc1~83 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21157c66abb349c97d02a1a104a6e1cfcb577542;p=thirdparty%2Fsamba.git s4-torture: fix asserts in clusapi_NodeControl tests Guenther Signed-off-by: Guenther Deschner Reviewed-by: Jeremy Allison --- diff --git a/source4/torture/rpc/clusapi.c b/source4/torture/rpc/clusapi.c index 46950aff4e1..995a8bdd438 100644 --- a/source4/torture/rpc/clusapi.c +++ b/source4/torture/rpc/clusapi.c @@ -1660,8 +1660,8 @@ static bool test_NodeControl_int(struct torture_context *tctx, const char *str; DATA_BLOB blob = data_blob_const(r.out.lpOutBuffer, *r.out.lpBytesReturned); - torture_assert(tctx, *r.out.lpBytesReturned < 4, "unexpected size"); - torture_assert(tctx, *r.out.lpBytesReturned % 2, "must be a multiple of 2"); + torture_assert(tctx, *r.out.lpBytesReturned >= 4, "must be at least 4 bytes long"); + torture_assert(tctx, (*r.out.lpBytesReturned % 2) == 0, "must be a multiple of 2"); torture_assert(tctx, pull_reg_sz(tctx, &blob, &str),