From: Volker Lendecke Date: Thu, 26 Mar 2020 10:11:35 +0000 (+0100) Subject: ldb: Use ARRAY_DEL_ELEMENT() in ldb_dn_extended_filter() X-Git-Tag: ldb-2.2.0~1205 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2a4eecbb3576b2790613cddc571f0486af9f91f;p=thirdparty%2Fsamba.git ldb: Use ARRAY_DEL_ELEMENT() in ldb_dn_extended_filter() Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/lib/ldb/common/ldb_dn.c b/lib/ldb/common/ldb_dn.c index 83f94e3b913..54c845c38ba 100644 --- a/lib/ldb/common/ldb_dn.c +++ b/lib/ldb/common/ldb_dn.c @@ -908,9 +908,8 @@ void ldb_dn_extended_filter(struct ldb_dn *dn, const char * const *accept_list) unsigned int i; for (i=0; iext_comp_num; i++) { if (!ldb_attr_in_list(accept_list, dn->ext_components[i].name)) { - memmove(&dn->ext_components[i], - &dn->ext_components[i+1], - (dn->ext_comp_num-(i+1))*sizeof(dn->ext_components[0])); + ARRAY_DEL_ELEMENT( + dn->ext_components, i, dn->ext_comp_num); dn->ext_comp_num--; i--; }