diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-06-30 13:49:39 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2014-07-12 18:43:58 -0400 |
commit | 002160269fcc73a01ca3889d3011afc9b63a53bd (patch) | |
tree | 380777bc8be7177a72ca69cb2018c3f6a301eea2 /fs | |
parent | 8ee2b78a444c6715e873486794b5c4af705cd975 (diff) |
NFS: use ARRAY_SIZE instead of sizeof/sizeof[0]
Use macro definition
Cc: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: linux-nfs@vger.kernel.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/super.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 084af1060d79..c08e837c29e5 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -1027,8 +1027,7 @@ static bool nfs_auth_info_add(struct nfs_auth_info *auth_info, | |||
1027 | rpc_authflavor_t flavor) | 1027 | rpc_authflavor_t flavor) |
1028 | { | 1028 | { |
1029 | unsigned int i; | 1029 | unsigned int i; |
1030 | unsigned int max_flavor_len = (sizeof(auth_info->flavors) / | 1030 | unsigned int max_flavor_len = ARRAY_SIZE(auth_info->flavors); |
1031 | sizeof(auth_info->flavors[0])); | ||
1032 | 1031 | ||
1033 | /* make sure this flavor isn't already in the list */ | 1032 | /* make sure this flavor isn't already in the list */ |
1034 | for (i = 0; i < auth_info->flavor_len; i++) { | 1033 | for (i = 0; i < auth_info->flavor_len; i++) { |