diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-04-28 01:09:25 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-04-28 01:09:25 +0000 |
commit | b9ba7aeb165cffecdffb60aec8c3fa8d590d9ca9 (patch) | |
tree | 42d07b0c7246ae2536a702e7c5de9e2732341116 /fs/nfs/mount_clnt.c | |
parent | 7406b0a326f2d70ade2671c37d1beef62249db97 (diff) |
Merge with 2.3.99-pre6.
Diffstat (limited to 'fs/nfs/mount_clnt.c')
-rw-r--r-- | fs/nfs/mount_clnt.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c index 0adfacd3e..980f90b98 100644 --- a/fs/nfs/mount_clnt.c +++ b/fs/nfs/mount_clnt.c @@ -120,10 +120,12 @@ xdr_encode_dirpath(struct rpc_rqst *req, u32 *p, const char *path) static int xdr_decode_fhstatus(struct rpc_rqst *req, u32 *p, struct mnt_fhstatus *res) { - memset((u8 *)res, 0, sizeof(*res)); + struct nfs_fh *fh = res->fh; + + memset((void *)fh, 0, sizeof(*fh)); if ((res->status = ntohl(*p++)) == 0) { - res->fh->size = NFS2_FHSIZE; - memcpy(res->fh->data, p, NFS2_FHSIZE); + fh->size = NFS2_FHSIZE; + memcpy(fh->data, p, NFS2_FHSIZE); } return 0; } @@ -131,12 +133,14 @@ xdr_decode_fhstatus(struct rpc_rqst *req, u32 *p, struct mnt_fhstatus *res) static int xdr_decode_fhstatus3(struct rpc_rqst *req, u32 *p, struct mnt_fhstatus *res) { - memset((u8 *)res, 0, sizeof(*res)); + struct nfs_fh *fh = res->fh; + + memset((void *)fh, 0, sizeof(*fh)); if ((res->status = ntohl(*p++)) == 0) { int size = ntohl(*p++); if (size <= NFS3_FHSIZE) { - res->fh->size = size; - memcpy(res->fh->data, p, res->fh->size); + fh->size = size; + memcpy(fh->data, p, size); } else res->status = -EBADHANDLE; } |