summaryrefslogtreecommitdiff
path: root/setcifsacl.c
diff options
context:
space:
mode:
Diffstat (limited to 'setcifsacl.c')
-rw-r--r--setcifsacl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/setcifsacl.c b/setcifsacl.c
index 7f92b91..67dd29c 100644
--- a/setcifsacl.c
+++ b/setcifsacl.c
@@ -183,7 +183,7 @@ static int
ace_set(struct cifs_ntsd *pntsd, struct cifs_ntsd **npntsd, ssize_t *bufsize,
struct cifs_ace **cacesptr, int numcaces)
{
- int i, rc, acessize = 0;
+ int i, rc, size = 0, acessize = 0;
size_t acesoffset;
char *acesptr;
@@ -193,8 +193,9 @@ ace_set(struct cifs_ntsd *pntsd, struct cifs_ntsd **npntsd, ssize_t *bufsize,
acesptr = (char *)*npntsd + acesoffset;
for (i = 0; i < numcaces; ++i) {
- acessize += copy_ace((struct cifs_ace *)acesptr, cacesptr[i]);
- acesptr += sizeof(struct cifs_ace);
+ size = copy_ace((struct cifs_ace *)acesptr, cacesptr[i]);
+ acessize += size;
+ acesptr += size;
}
copy_sec_desc(pntsd, *npntsd, numcaces, acessize);
acesptr = (char *)*npntsd + acesoffset;