1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00

ldb: Use ARRAY_DEL_ELEMENT() in ldb_kv_index_del_value()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Volker Lendecke 2020-03-26 11:08:07 +01:00 committed by Ralph Boehme
parent d45174a060
commit 61a28bceef

View File

@ -3266,9 +3266,7 @@ int ldb_kv_index_del_value(struct ldb_module *module,
}
j = (unsigned int) i;
if (j != list->count - 1) {
memmove(&list->dn[j], &list->dn[j+1], sizeof(list->dn[0])*(list->count - (j+1)));
}
ARRAY_DEL_ELEMENT(list->dn, j, list->count);
list->count--;
if (list->count == 0) {
talloc_free(list->dn);