]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
nfsd warning fix
authorAndrew Morton <akpm@linux-foundation.org>
Tue, 17 Jul 2007 11:04:34 +0000 (04:04 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 17 Jul 2007 17:23:06 +0000 (10:23 -0700)
gcc-4.3:

fs/nfsd/nfsctl.c: In function 'write_getfs':
fs/nfsd/nfsctl.c:248: warning: cast from pointer to integer of different size

Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/nfsd/nfsctl.c

index 71c686dc7257140f3c12c7cd0549d93af3f48816..5ab80edc795b750f9d43977ef2d5b790b1673280 100644 (file)
@@ -245,7 +245,7 @@ static ssize_t write_getfs(struct file *file, char *buf, size_t size)
        }
        exp_readunlock();
        if (err == 0)
-               err = res->fh_size + (int)&((struct knfsd_fh*)0)->fh_base;
+               err = res->fh_size + offsetof(struct knfsd_fh, fh_base);
  out:
        return err;
 }