From: Volker Lendecke Date: Thu, 26 Mar 2020 10:39:56 +0000 (+0100) Subject: smbcacls: Use ARRAY_DEL_ELEMENT() in sort_acl() X-Git-Tag: ldb-2.2.0~1216 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac71d6b2f88bac38529f38340c02ea5b767d82d0;p=thirdparty%2Fsamba.git smbcacls: Use ARRAY_DEL_ELEMENT() in sort_acl() Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c index 084df9f9a4a..103acdc1d18 100644 --- a/source3/utils/smbcacls.c +++ b/source3/utils/smbcacls.c @@ -499,10 +499,8 @@ static void sort_acl(struct security_acl *the_acl) for (i=1;inum_aces;) { if (security_ace_equal(&the_acl->aces[i-1], &the_acl->aces[i])) { - int j; - for (j=i; jnum_aces-1; j++) { - the_acl->aces[j] = the_acl->aces[j+1]; - } + ARRAY_DEL_ELEMENT( + the_acl->aces, i, the_acl->num_aces); the_acl->num_aces--; } else { i++;