[PATCH] V850: user ARRAY_SIZE macro when appropriate
[sfrench/cifs-2.6.git] / fs / nfsctl.c
index 1c72c7f85ddc183ae24103baa80dafeee7a47a04..c043136a82caa862d9b72d7196047765490064a0 100644 (file)
@@ -4,7 +4,6 @@
  *     This should eventually move to userland.
  *
  */
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/file.h>
 #include <linux/fs.h>
@@ -101,7 +100,7 @@ asmlinkage sys_nfsservctl(int cmd, struct nfsctl_arg __user *arg, void __user *r
        if (version != NFSCTL_VERSION)
                return -EINVAL;
 
-       if (cmd < 0 || cmd >= sizeof(map)/sizeof(map[0]) || !map[cmd].name)
+       if (cmd < 0 || cmd >= ARRAY_SIZE(map) || !map[cmd].name)
                return -EINVAL;
 
        file = do_open(map[cmd].name, map[cmd].rsize ? O_RDWR : O_WRONLY);