summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthib <thib@openbsd.org>2008-06-14 00:26:13 +0000
committerthib <thib@openbsd.org>2008-06-14 00:26:13 +0000
commit9e0b53d5a4e2f6cb02d9641a9f4120ae6ea86b9e (patch)
tree35887e22373a543b8f8e4c493360e6ecc7140522
parentput the canonical ifdef dance for multiple inclusion, also put all the (diff)
downloadwireguard-openbsd-9e0b53d5a4e2f6cb02d9641a9f4120ae6ea86b9e.tar.xz
wireguard-openbsd-9e0b53d5a4e2f6cb02d9641a9f4120ae6ea86b9e.zip
use nfsm_padlen() where appropriate;
ok blambert@
-rw-r--r--sys/nfs/nfs_serv.c6
-rw-r--r--sys/nfs/nfs_subs.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/nfs/nfs_serv.c b/sys/nfs/nfs_serv.c
index 77d1ad54cf4..698924bc86e 100644
--- a/sys/nfs/nfs_serv.c
+++ b/sys/nfs/nfs_serv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_serv.c,v 1.54 2008/06/13 03:49:26 blambert Exp $ */
+/* $OpenBSD: nfs_serv.c,v 1.55 2008/06/14 00:26:13 thib Exp $ */
/* $NetBSD: nfs_serv.c,v 1.34 1997/05/12 23:37:12 fvdl Exp $ */
/*
@@ -2499,7 +2499,7 @@ again:
while (cpos < cend && ncookies > 0) {
if (dp->d_fileno != 0) {
nlen = dp->d_namlen;
- pad = nfsm_rndup(nlen) - nlen;
+ pad = nfsm_padlen(nlen);
len += (4 * NFSX_UNSIGNED + nlen + pad);
if (v3)
len += 2 * NFSX_UNSIGNED;
@@ -2718,7 +2718,7 @@ again:
while (cpos < cend && ncookies > 0) {
if (dp->d_fileno != 0) {
nlen = dp->d_namlen;
- pad = nfsm_rndup(nlen) - nlen;
+ pad = nfsm_padlen(nlen);
/*
* For readdir_and_lookup get the vnode using
diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c
index 2430df74d7d..d281a1a2145 100644
--- a/sys/nfs/nfs_subs.c
+++ b/sys/nfs/nfs_subs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_subs.c,v 1.82 2008/06/13 22:11:32 blambert Exp $ */
+/* $OpenBSD: nfs_subs.c,v 1.83 2008/06/14 00:26:13 thib Exp $ */
/* $NetBSD: nfs_subs.c,v 1.27.4.3 1996/07/08 20:34:24 jtc Exp $ */
/*
@@ -666,7 +666,7 @@ nfsm_mbuftouio(mrep, uiop, siz, dpos)
mp = *mrep;
mbufcp = *dpos;
len = mtod(mp, caddr_t)+mp->m_len-mbufcp;
- rem = nfsm_rndup(siz)-siz;
+ rem = nfsm_padlen(siz);
while (siz > 0) {
if (uiop->uio_iovcnt <= 0 || uiop->uio_iov == NULL)
return (EFBIG);
@@ -1280,7 +1280,7 @@ nfs_namei(ndp, fhp, len, slp, nam, mdp, dposp, retdirp, p)
*tocp = '\0';
*mdp = md;
*dposp = fromcp;
- len = nfsm_rndup(len)-len;
+ len = nfsm_padlen(len);
if (len > 0) {
if (rem >= len)
*dposp += len;