NFS4: Fix incorrect use of sizeof() in fs/nfs/nfs4xdr.c
commit8ae20abdd18c6c7f21bbae931353e7cfad77d7b6
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Mon, 14 May 2007 20:50:45 +0000 (14 16:50 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Mon, 14 May 2007 23:33:45 +0000 (14 19:33 -0400)
tree8134b98cb6b741742972764307d455e078c52bbf
parent60945cb7c8377b727288275f21791914fe65311c
NFS4: Fix incorrect use of sizeof() in fs/nfs/nfs4xdr.c

The XDR code should not depend on the physical allocation size of
structures like nfs4_stateid and nfs4_verifier since those may have to
change at some future date. We therefore replace all uses of
sizeof() with constants like NFS4_VERIFIER_SIZE and NFS4_STATEID_SIZE.

This also has the side-effect of fixing some warnings of the type
format ‘%u’ expects type ‘unsigned int’, but argument X has type
‘long unsigned int’
on 64-bit systems

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/nfs4xdr.c
include/linux/nfs4.h