]> git.karo-electronics.de Git - linux-beck.git/commitdiff
NFS: use ARRAY_SIZE instead of sizeof/sizeof[0]
authorFabian Frederick <fabf@skynet.be>
Mon, 30 Jun 2014 17:49:39 +0000 (19:49 +0200)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Sat, 12 Jul 2014 22:43:58 +0000 (18:43 -0400)
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>
fs/nfs/super.c

index 084af1060d79e1b289f6989dd251eeab2e59f7f6..c08e837c29e5bd3a486e328b5070db90abb918b4 100644 (file)
@@ -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++) {