1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

lib: Use ARRAY_DEL_ELEMENT in messaging_dispatch_waiters()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Volker Lendecke 2020-03-25 22:25:06 +01:00 committed by Ralph Boehme
parent 94d580c062
commit 0e14156c92

View File

@ -1327,12 +1327,8 @@ static bool messaging_dispatch_waiters(struct messaging_context *msg_ctx,
* to keep the order of waiters, as
* other code may depend on this.
*/
if (i < msg_ctx->num_waiters - 1) {
memmove(&msg_ctx->waiters[i],
&msg_ctx->waiters[i+1],
sizeof(struct tevent_req *) *
(msg_ctx->num_waiters - i - 1));
}
ARRAY_DEL_ELEMENT(
msg_ctx->waiters, i, msg_ctx->num_waiters);
msg_ctx->num_waiters -= 1;
continue;
}