summaryrefslogtreecommitdiffstats
path: root/sys/nfs/nfs_common.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/nfs/nfs_common.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/nfs/nfs_common.h')
-rw-r--r--sys/nfs/nfs_common.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/nfs/nfs_common.h b/sys/nfs/nfs_common.h
index 889054d..3b3ab85 100644
--- a/sys/nfs/nfs_common.h
+++ b/sys/nfs/nfs_common.h
@@ -66,9 +66,8 @@ void *nfsm_build_xx(int s, struct mbuf **mb, caddr_t *bpos);
/* Interpretation phase macros */
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 **md,
- caddr_t *dpos);
-int nfsm_adv_xx(int s, u_int32_t **tl, struct mbuf **md, caddr_t *dpos);
+int nfsm_strsiz_xx(int *s, int m, struct mbuf **md, caddr_t *dpos);
+int nfsm_adv_xx(int s, struct mbuf **md, caddr_t *dpos);
/* Error check helpers */
#define nfsm_dcheck(t1, mrep) \
@@ -102,7 +101,7 @@ do { \
#define nfsm_strsiz(s,m) \
do { \
int t1; \
- t1 = nfsm_strsiz_xx(&(s), (m), &tl, &md, &dpos); \
+ t1 = nfsm_strsiz_xx(&(s), (m), &md, &dpos); \
nfsm_dcheck(t1, mrep); \
} while(0)
@@ -119,7 +118,7 @@ do {\
#define nfsm_adv(s) \
do { \
int t1; \
- t1 = nfsm_adv_xx((s), &tl, &md, &dpos); \
+ t1 = nfsm_adv_xx((s), &md, &dpos); \
nfsm_dcheck(t1, mrep); \
} while (0)
OpenPOWER on IntegriCloud