diff options
author | 2007-09-26 16:00:55 +0000 | |
---|---|---|
committer | 2007-09-26 16:00:55 +0000 | |
commit | 609fd42b7acadef3a120f31e9136f843c57462a8 (patch) | |
tree | a6905f3ec2c7efd41e7d2575cdf3556556303794 | |
parent | ep(4) is totally weird. due to hardware design limitations it plays (diff) | |
download | wireguard-openbsd-609fd42b7acadef3a120f31e9136f843c57462a8.tar.xz wireguard-openbsd-609fd42b7acadef3a120f31e9136f843c57462a8.zip |
nfsm_uiotom macro does nothing but hide error-handling code; replace
inline in the one place that it's called
ok thib@, weingart@
"I don't see why not" fgsch@
-rw-r--r-- | sys/nfs/nfs_vnops.c | 8 | ||||
-rw-r--r-- | sys/nfs/nfsm_subs.h | 9 |
2 files changed, 7 insertions, 10 deletions
diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c index 5f22c61ecf4..3711b0b999a 100644 --- a/sys/nfs/nfs_vnops.c +++ b/sys/nfs/nfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_vnops.c,v 1.77 2007/09/20 12:54:31 thib Exp $ */ +/* $OpenBSD: nfs_vnops.c,v 1.78 2007/09/26 16:00:55 blambert Exp $ */ /* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */ /* @@ -1034,7 +1034,11 @@ nfs_writerpc(vp, uiop, iomode, must_commit) *tl = x; /* size of this write */ } - nfsm_uiotom(uiop, len); + if ((t1 = nfsm_uiotombuf(uiop, &mb, len, &bpos)) != 0) { + error = t1; + m_freem(mreq); + goto nfsmout; + } nfsm_request(vp, NFSPROC_WRITE, uiop->uio_procp, VTONFS(vp)->n_wcred); if (v3) { diff --git a/sys/nfs/nfsm_subs.h b/sys/nfs/nfsm_subs.h index f96561b8d45..c9313944c43 100644 --- a/sys/nfs/nfsm_subs.h +++ b/sys/nfs/nfsm_subs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: nfsm_subs.h,v 1.17 2007/09/11 13:41:52 blambert Exp $ */ +/* $OpenBSD: nfsm_subs.h,v 1.18 2007/09/26 16:00:55 blambert Exp $ */ /* $NetBSD: nfsm_subs.h,v 1.10 1996/03/20 21:59:56 fvdl Exp $ */ /* @@ -320,13 +320,6 @@ goto nfsmout; \ } -#define nfsm_uiotom(p,s) \ - if ((t1 = nfsm_uiotombuf((p),&mb,(s),&bpos)) != 0) { \ - error = t1; \ - m_freem(mreq); \ - goto nfsmout; \ - } - #define nfsm_reqhead(v,a,s) \ mb = mreq = nfsm_reqh((v),(a),(s),&bpos) |