X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fnfsctl.c;h=c043136a82caa862d9b72d7196047765490064a0;hb=refs%2Fheads%2Fvserver;hp=1c72c7f85ddc183ae24103baa80dafeee7a47a04;hpb=76828883507a47dae78837ab5dec5a5b4513c667;p=linux-2.6.git diff --git a/fs/nfsctl.c b/fs/nfsctl.c index 1c72c7f85..c043136a8 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);