From: Volker Lendecke Date: Wed, 25 Mar 2020 21:36:48 +0000 (+0100) Subject: libsmb: Use ARRAY_DEL_ELEMENT() in sort_acl() X-Git-Tag: ldb-2.2.0~1218 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=487ca0754dee4af62d35cce7a55524e5da5c45f5;p=thirdparty%2Fsamba.git libsmb: Use ARRAY_DEL_ELEMENT() in sort_acl() Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/libsmb/libsmb_xattr.c b/source3/libsmb/libsmb_xattr.c index 06a1d0c601d..8dde8c1bc90 100644 --- a/source3/libsmb/libsmb_xattr.c +++ b/source3/libsmb/libsmb_xattr.c @@ -154,10 +154,8 @@ 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++;