Skip to content

Commit

Permalink
NFS: use ARRAY_SIZE instead of sizeof/sizeof[0]
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fabian Frederick authored and trondmypd committed Jul 12, 2014
1 parent 8ee2b78 commit 0021602
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/nfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1027,8 +1027,7 @@ static bool nfs_auth_info_add(struct nfs_auth_info *auth_info,
rpc_authflavor_t flavor)
{
unsigned int i;
unsigned int max_flavor_len = (sizeof(auth_info->flavors) /
sizeof(auth_info->flavors[0]));
unsigned int max_flavor_len = ARRAY_SIZE(auth_info->flavors);

/* make sure this flavor isn't already in the list */
for (i = 0; i < auth_info->flavor_len; i++) {
Expand Down

0 comments on commit 0021602

Please sign in to comment.