summaryrefslogtreecommitdiffstats
path: root/sys/nfsserver/nfsm_subs.h
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2001-12-18 01:22:09 +0000
committeriedowse <iedowse@FreeBSD.org>2001-12-18 01:22:09 +0000
commit6e9f1df98f816467a63dc5b41cea58f28843e390 (patch)
tree9270c37106f68890c1fcce6d366590e69faa1848 /sys/nfsserver/nfsm_subs.h
parentbba76f2085975aeba776356b2556c99b8c882bd5 (diff)
downloadFreeBSD-src-6e9f1df98f816467a63dc5b41cea58f28843e390.zip
FreeBSD-src-6e9f1df98f816467a63dc5b41cea58f28843e390.tar.gz
Avoid passing the variable `tl' to functions that just use it for
temporary storage. In the old NFS code it wasn't at all clear if the value of `tl' was used across or after macro calls, but I'm fairly confident that the convention was to keep its use local. Each ex-macro function now uses a local version of this variable, so all of the double-indirection goes away. The only exception to the `local use' rule for `tl' is nfsm_clget(), which is left unchanged by this commit. Reviewed by: peter
Diffstat (limited to 'sys/nfsserver/nfsm_subs.h')
-rw-r--r--sys/nfsserver/nfsm_subs.h28
1 files changed, 12 insertions, 16 deletions
diff --git a/sys/nfsserver/nfsm_subs.h b/sys/nfsserver/nfsm_subs.h
index d39b207..f81127b 100644
--- a/sys/nfsserver/nfsm_subs.h
+++ b/sys/nfsserver/nfsm_subs.h
@@ -76,19 +76,16 @@
/* ************************************* */
/* Dissection phase macros */
-int nfsm_srvstrsiz_xx(int *s, int m, u_int32_t **tl, struct mbuf **md,
- caddr_t *dpos);
-int nfsm_srvnamesiz_xx(int *s, u_int32_t **tl, struct mbuf **md,
- caddr_t *dpos);
+int nfsm_srvstrsiz_xx(int *s, int m, struct mbuf **md, caddr_t *dpos);
+int nfsm_srvnamesiz_xx(int *s, struct mbuf **md, caddr_t *dpos);
int nfsm_srvmtofh_xx(fhandle_t *f, struct nfsrv_descript *nfsd,
- u_int32_t **tl, struct mbuf **md, caddr_t *dpos);
-int nfsm_srvsattr_xx(struct vattr *a, u_int32_t **tl, struct mbuf **md,
- caddr_t *dpos);
+ struct mbuf **md, caddr_t *dpos);
+int nfsm_srvsattr_xx(struct vattr *a, struct mbuf **md, caddr_t *dpos);
#define nfsm_srvstrsiz(s, m) \
do { \
int t1; \
- t1 = nfsm_srvstrsiz_xx(&(s), (m), &tl, &md, &dpos); \
+ t1 = nfsm_srvstrsiz_xx(&(s), (m), &md, &dpos); \
if (t1) { \
error = t1; \
nfsm_reply(0); \
@@ -98,7 +95,7 @@ do { \
#define nfsm_srvnamesiz(s) \
do { \
int t1; \
- t1 = nfsm_srvnamesiz_xx(&(s), &tl, &md, &dpos); \
+ t1 = nfsm_srvnamesiz_xx(&(s), &md, &dpos); \
if (t1) { \
error = t1; \
nfsm_reply(0); \
@@ -108,7 +105,7 @@ do { \
#define nfsm_srvmtofh(f) \
do { \
int t1; \
- t1 = nfsm_srvmtofh_xx((f), nfsd, &tl, &md, &dpos); \
+ t1 = nfsm_srvmtofh_xx((f), nfsd, &md, &dpos); \
if (t1) { \
error = t1; \
nfsm_reply(0); \
@@ -119,7 +116,7 @@ do { \
#define nfsm_srvsattr(a) \
do { \
int t1; \
- t1 = nfsm_srvsattr_xx((a), &tl, &md, &dpos); \
+ t1 = nfsm_srvsattr_xx((a), &md, &dpos); \
if (t1) { \
error = t1; \
m_freem(mrep); \
@@ -153,18 +150,17 @@ do { \
/* ************************************* */
/* Reply phase macros - add additional reply info */
-void nfsm_srvfhtom_xx(fhandle_t *f, int v3, u_int32_t **tl, struct mbuf **mb,
- caddr_t *bpos);
-void nfsm_srvpostop_fh_xx(fhandle_t *f, u_int32_t **tl, struct mbuf **mb,
+void nfsm_srvfhtom_xx(fhandle_t *f, int v3, struct mbuf **mb,
caddr_t *bpos);
+void nfsm_srvpostop_fh_xx(fhandle_t *f, struct mbuf **mb, caddr_t *bpos);
void nfsm_clget_xx(u_int32_t **tl, struct mbuf *mb, struct mbuf **mp,
char **bp, char **be, caddr_t bpos);
#define nfsm_srvfhtom(f, v3) \
- nfsm_srvfhtom_xx((f), (v3), &tl, &mb, &bpos)
+ nfsm_srvfhtom_xx((f), (v3), &mb, &bpos)
#define nfsm_srvpostop_fh(f) \
- nfsm_srvpostop_fh_xx((f), &tl, &mb, &bpos)
+ nfsm_srvpostop_fh_xx((f), &mb, &bpos)
#define nfsm_srvwcc_data(br, b, ar, a) \
nfsm_srvwcc(nfsd, (br), (b), (ar), (a), &mb, &bpos)
OpenPOWER on IntegriCloud