Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 00216026 authored by Fabian Frederick's avatar Fabian Frederick Committed by Trond Myklebust
Browse files

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: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent 8ee2b78a
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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++) {