Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Fabian Frederick and committed by
Trond Myklebust
00216026 8ee2b78a

+1 -2
+1 -2
fs/nfs/super.c
··· 1027 1027 rpc_authflavor_t flavor) 1028 1028 { 1029 1029 unsigned int i; 1030 - unsigned int max_flavor_len = (sizeof(auth_info->flavors) / 1031 - sizeof(auth_info->flavors[0])); 1030 + unsigned int max_flavor_len = ARRAY_SIZE(auth_info->flavors); 1032 1031 1033 1032 /* make sure this flavor isn't already in the list */ 1034 1033 for (i = 0; i < auth_info->flavor_len; i++) {