diff options
author | Volker Lendecke <vl@samba.org> | 2020-03-26 11:12:55 +0100 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2020-03-26 14:43:32 +0000 |
commit | 130502af0be73bc17697ae318b42e3255b426fa6 (patch) | |
tree | 4c400b2bf7dbe89fe320287aef42402d2f2da3fa /lib | |
parent | f2a4eecbb3576b2790613cddc571f0486af9f91f (diff) | |
download | samba-130502af0be73bc17697ae318b42e3255b426fa6.tar.gz |
ldb: Use ARRAY_DEL_ELEMENT() in ldb_dn_set_extended_component()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ldb/common/ldb_dn.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/ldb/common/ldb_dn.c b/lib/ldb/common/ldb_dn.c index 54c845c38ba..001fcad621f 100644 --- a/lib/ldb/common/ldb_dn.c +++ b/lib/ldb/common/ldb_dn.c @@ -2062,12 +2062,10 @@ int ldb_dn_set_extended_component(struct ldb_dn *dn, return LDB_ERR_OPERATIONS_ERROR; } } else { - if (i != (dn->ext_comp_num - 1)) { - memmove(&dn->ext_components[i], - &dn->ext_components[i+1], - ((dn->ext_comp_num-1) - i) * - sizeof(*dn->ext_components)); - } + ARRAY_DEL_ELEMENT( + dn->ext_components, + i, + dn->ext_comp_num); dn->ext_comp_num--; dn->ext_components = talloc_realloc(dn, |