git.samba.org
/
bbaumbach
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
487ca07
)
sharesec: Use ARRAY_DEL_ELEMENT() in sort_acl()
author
Volker Lendecke
<vl@samba.org>
Thu, 26 Mar 2020 10:39:08 +0000
(11:39 +0100)
committer
Ralph Boehme
<slow@samba.org>
Thu, 26 Mar 2020 14:43:31 +0000
(14:43 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/utils/sharesec.c
patch
|
blob
|
history
diff --git
a/source3/utils/sharesec.c
b/source3/utils/sharesec.c
index 454c5bfe36b029d678006d21f1a995b7a6cb358c..419a6411334210a4251dfedb7fa57c8f6fc706cd 100644
(file)
--- a/
source3/utils/sharesec.c
+++ b/
source3/utils/sharesec.c
@@
-145,10
+145,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++;