aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2007-05-14 16:50:45 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-05-14 19:33:45 -0400
commit8ae20abdd18c6c7f21bbae931353e7cfad77d7b6 (patch)
tree8134b98cb6b741742972764307d455e078c52bbf /include
parent60945cb7c8377b727288275f21791914fe65311c (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nfs4.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h
index 1be5be88debe..7e7f33a38fc0 100644
--- a/include/linux/nfs4.h
+++ b/include/linux/nfs4.h
@@ -16,6 +16,7 @@
16#include <linux/types.h> 16#include <linux/types.h>
17 17
18#define NFS4_VERIFIER_SIZE 8 18#define NFS4_VERIFIER_SIZE 8
19#define NFS4_STATEID_SIZE 16
19#define NFS4_FHSIZE 128 20#define NFS4_FHSIZE 128
20#define NFS4_MAXPATHLEN PATH_MAX 21#define NFS4_MAXPATHLEN PATH_MAX
21#define NFS4_MAXNAMLEN NAME_MAX 22#define NFS4_MAXNAMLEN NAME_MAX
@@ -113,7 +114,7 @@ struct nfs4_acl {
113}; 114};
114 115
115typedef struct { char data[NFS4_VERIFIER_SIZE]; } nfs4_verifier; 116typedef struct { char data[NFS4_VERIFIER_SIZE]; } nfs4_verifier;
116typedef struct { char data[16]; } nfs4_stateid; 117typedef struct { char data[NFS4_STATEID_SIZE]; } nfs4_stateid;
117 118
118enum nfs_opnum4 { 119enum nfs_opnum4 {
119 OP_ACCESS = 3, 120 OP_ACCESS = 3,