diff options
author | Jeff Layton <jlayton@redhat.com> | 2012-11-25 08:00:36 -0500 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2012-12-05 13:13:10 -0600 |
commit | 852e22950dc47e774bb602b16f55fed42afac5fb (patch) | |
tree | 204bb2d69a3e408567d3ecc8cbdda70f208b8474 /fs/cifs/cifsacl.c | |
parent | fc03d8a5a18172ebdb2402cc355abb8fd3cbb844 (diff) | |
download | linux-852e22950dc47e774bb602b16f55fed42afac5fb.tar.gz linux-852e22950dc47e774bb602b16f55fed42afac5fb.tar.bz2 linux-852e22950dc47e774bb602b16f55fed42afac5fb.zip |
cifs: use the NUM_AUTHS and NUM_SUBAUTHS constants in cifsacl code
...instead of hardcoding in '5' and '6' all over the place.
Reviewed-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/cifsacl.c')
-rw-r--r-- | fs/cifs/cifsacl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c index d35579a1640a..18437c5561fe 100644 --- a/fs/cifs/cifsacl.c +++ b/fs/cifs/cifsacl.c @@ -210,7 +210,7 @@ sid_to_str(struct cifs_sid *sidptr, char *sidstr) sprintf(strptr, "-%d", sidptr->revision); strptr = sidstr + strlen(sidstr); - for (i = 0; i < 6; ++i) { + for (i = 0; i < NUM_AUTHS; ++i) { if (sidptr->authority[i]) { sprintf(strptr, "-%d", sidptr->authority[i]); strptr = sidstr + strlen(sidstr); @@ -649,7 +649,7 @@ int compare_sids(const struct cifs_sid *ctsid, const struct cifs_sid *cwsid) } /* compare all of the six auth values */ - for (i = 0; i < 6; ++i) { + for (i = 0; i < NUM_AUTHS; ++i) { if (ctsid->authority[i] != cwsid->authority[i]) { if (ctsid->authority[i] > cwsid->authority[i]) return 1; @@ -811,7 +811,7 @@ static __u16 fill_ace_for_sid(struct cifs_ace *pntace, pntace->sid.revision = psid->revision; pntace->sid.num_subauth = psid->num_subauth; - for (i = 0; i < 6; i++) + for (i = 0; i < NUM_AUTHS; i++) pntace->sid.authority[i] = psid->authority[i]; for (i = 0; i < psid->num_subauth; i++) pntace->sid.sub_auth[i] = psid->sub_auth[i]; |