X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Fnfsctl.c;h=c043136a82caa862d9b72d7196047765490064a0;hb=ecd27b92fbb41f779d857632a69bd45dbaf0f915;hp=1c72c7f85ddc183ae24103baa80dafeee7a47a04;hpb=d04cdb64212eb5ae6a98026a97dda626e40e8e9a;p=linux-2.6 diff --git a/fs/nfsctl.c b/fs/nfsctl.c index 1c72c7f85d..c043136a82 100644 --- a/fs/nfsctl.c +++ b/fs/nfsctl.c @@ -4,7 +4,6 @@ * This should eventually move to userland. * */ -#include #include #include #include @@ -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);