From bb681191f6e6b68a301fe41df1fb713d2b824dce Mon Sep 17 00:00:00 2001 From: Stefan Kempf Date: Mon, 25 Jan 2016 18:47:01 +0000 Subject: Convert to uiomove(). Diff from Martin Natano. --- sys/net/ppp_tty.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sys') 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); } -- cgit v1.2.3