From b9ba7aeb165cffecdffb60aec8c3fa8d590d9ca9 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Fri, 28 Apr 2000 01:09:25 +0000 Subject: Merge with 2.3.99-pre6. --- fs/nfs/mount_clnt.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'fs/nfs/mount_clnt.c') 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; } -- cgit v1.2.3