summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorStefan Kempf <stefan@cvs.openbsd.org>2016-01-25 18:47:01 +0000
committerStefan Kempf <stefan@cvs.openbsd.org>2016-01-25 18:47:01 +0000
commitbb681191f6e6b68a301fe41df1fb713d2b824dce (patch)
tree9a487599a9d8b6b565829f17390a601111412779 /sys
parent467761a92ba0bfbc32cdfb149b39d1d9cf172457 (diff)
Convert to uiomove(). Diff from Martin Natano.
Diffstat (limited to 'sys')
-rw-r--r--sys/net/ppp_tty.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/net/ppp_tty.c b/sys/net/ppp_tty.c
index 0f29a477de7..11c41ccb402 100644
--- a/sys/net/ppp_tty.c
+++ b/sys/net/ppp_tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ppp_tty.c,v 1.42 2016/01/14 09:44:08 sf Exp $ */
+/* $OpenBSD: ppp_tty.c,v 1.43 2016/01/25 18:47:00 stefan Exp $ */
/* $NetBSD: ppp_tty.c,v 1.12 1997/03/24 21:23:10 christos Exp $ */
/*
@@ -318,7 +318,7 @@ pppread(struct tty *tp, struct uio *uio, int flag)
splx(s);
for (m = m0; m && uio->uio_resid; m = m->m_next)
- if ((error = uiomovei(mtod(m, u_char *), m->m_len, uio)) != 0)
+ if ((error = uiomove(mtod(m, u_char *), m->m_len, uio)) != 0)
break;
m_freem(m0);
return (error);
@@ -333,7 +333,8 @@ pppwrite(struct tty *tp, struct uio *uio, int flag)
struct ppp_softc *sc = (struct ppp_softc *)tp->t_sc;
struct mbuf *m, *m0, **mp;
struct sockaddr dst;
- int len, error;
+ u_int len;
+ int error;
if ((tp->t_state & TS_CARR_ON) == 0 && (tp->t_cflag & CLOCAL) == 0)
return 0; /* wrote 0 bytes */
@@ -358,7 +359,7 @@ pppwrite(struct tty *tp, struct uio *uio, int flag)
len = M_TRAILINGSPACE(m);
if (len > uio->uio_resid)
len = uio->uio_resid;
- if ((error = uiomovei(mtod(m, u_char *), len, uio)) != 0) {
+ if ((error = uiomove(mtod(m, u_char *), len, uio)) != 0) {
m_freem(m0);
return (error);
}