diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2008-06-14 00:26:14 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2008-06-14 00:26:14 +0000 |
commit | 23f60cf29fd5cb95358167f1f71d8c14d41cf3bf (patch) | |
tree | 9c2d40cb5bace7dc192e65f0c8c3cc871f5fb05e | |
parent | 4d547cf1354c3db7de1c860e490afd56d26e3451 (diff) |
use nfsm_padlen() where appropriate;
ok blambert@
-rw-r--r-- | sys/nfs/nfs_serv.c | 6 | ||||
-rw-r--r-- | sys/nfs/nfs_subs.c | 6 |
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; |