summaryrefslogtreecommitdiffstats
path: root/sys/nfs/nfs_common.h
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2001-09-27 22:40:38 +0000
committerpeter <peter@FreeBSD.org>2001-09-27 22:40:38 +0000
commit2854bb2840809c802db31285bc55e9fc5e73ac20 (patch)
tree0787f81479ebda92d49c697add33a3151d9b4813 /sys/nfs/nfs_common.h
parentdd0c7c11066885a54661583d626cfe224c586ce1 (diff)
downloadFreeBSD-src-2854bb2840809c802db31285bc55e9fc5e73ac20.zip
FreeBSD-src-2854bb2840809c802db31285bc55e9fc5e73ac20.tar.gz
Make nfsm_dissect() have an obvious return value.
Diffstat (limited to 'sys/nfs/nfs_common.h')
-rw-r--r--sys/nfs/nfs_common.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/sys/nfs/nfs_common.h b/sys/nfs/nfs_common.h
index c43dd3e..a751a67 100644
--- a/sys/nfs/nfs_common.h
+++ b/sys/nfs/nfs_common.h
@@ -57,28 +57,28 @@ extern nfstype nfsv3_type[];
int nfs_adv(struct mbuf **, caddr_t *, int, int);
void *nfsm_build_xx(int s, struct mbuf **mb, caddr_t *bpos);
-int nfsm_dissect_xx(void **a, int s, struct mbuf **md, caddr_t *dpos);
+void *nfsm_dissect_xx(int s, struct mbuf **md, caddr_t *dpos);
int nfsm_strsiz_xx(int *s, int m, u_int32_t **tl, struct mbuf **mb,
caddr_t *bpos);
int nfsm_adv_xx(int s, u_int32_t **tl, struct mbuf **md, caddr_t *dpos);
u_quad_t nfs_curusec(void);
-int nfsm_disct(struct mbuf **, caddr_t *, int, int, caddr_t *);
+void *nfsm_disct(struct mbuf **, caddr_t *, int, int);
#define nfsm_build(c, s) \
- (c)nfsm_build_xx((s), &mb, &bpos); \
+ (c)nfsm_build_xx((s), &mb, &bpos)
-/* XXX 'c' arg (type) is not used */
-#define nfsm_dissect(a, c, s) \
-do { \
- int t1; \
- t1 = nfsm_dissect_xx((void **)&(a), (s), &md, &dpos); \
- if (t1) { \
- error = t1; \
+#define nfsm_dissect(c, s) \
+({ \
+ void *ret; \
+ ret = nfsm_dissect_xx((s), &md, &dpos); \
+ if (ret == NULL) { \
+ error = EBADRPC; \
m_freem(mrep); \
mrep = NULL; \
goto nfsmout; \
} \
-} while (0)
+ (c)ret; \
+})
#define nfsm_strsiz(s,m) \
do { \
OpenPOWER on IntegriCloud