]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/nfsd/nfs4xdr.c
[PATCH] fs: Use ARRAY_SIZE macro
[mirror_ubuntu-bionic-kernel.git] / fs / nfsd / nfs4xdr.c
index 69d3501173a8e79b2b0c01c167a45713f5867c2a..03857fd8112632a044ddab6d0a4ade576e762298 100644 (file)
@@ -992,7 +992,7 @@ nfsd4_decode_compound(struct nfsd4_compoundargs *argp)
        if (argp->opcnt > 100)
                goto xdr_error;
 
-       if (argp->opcnt > sizeof(argp->iops)/sizeof(argp->iops[0])) {
+       if (argp->opcnt > ARRAY_SIZE(argp->iops)) {
                argp->ops = kmalloc(argp->opcnt * sizeof(*argp->ops), GFP_KERNEL);
                if (!argp->ops) {
                        argp->ops = argp->iops;