diff options
author | Volker Lendecke <vl@samba.org> | 2020-03-26 11:39:56 +0100 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2020-03-26 14:43:31 +0000 |
commit | ac71d6b2f88bac38529f38340c02ea5b767d82d0 (patch) | |
tree | 4b62663a216ae6d402401e85f2ca91499328c95f /source3/utils | |
parent | 0f53715a551a5b919d3d28f87c4aa803416e60b6 (diff) | |
download | samba-ac71d6b2f88bac38529f38340c02ea5b767d82d0.tar.gz |
smbcacls: Use ARRAY_DEL_ELEMENT() in sort_acl()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/smbcacls.c | 6 |
1 files changed, 2 insertions, 4 deletions
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;i<the_acl->num_aces;) { if (security_ace_equal(&the_acl->aces[i-1], &the_acl->aces[i])) { - int j; - for (j=i; j<the_acl->num_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++; |