diff options
author | Stefan Kempf <stefan@cvs.openbsd.org> | 2016-01-12 16:21:10 +0000 |
---|---|---|
committer | Stefan Kempf <stefan@cvs.openbsd.org> | 2016-01-12 16:21:10 +0000 |
commit | b88e173969960af99b15a8bb4bc6b6e2c1aacd16 (patch) | |
tree | 7320d7b9ef4e869c464e92138e39f927183e8822 /sys/dev/wscons | |
parent | c3285ceea9e34b6cca0ea60755fd403d58eb847f (diff) |
Use uiomove() instead of uiomovei(); from Martin Natano
ok deraadt@
Diffstat (limited to 'sys/dev/wscons')
-rw-r--r-- | sys/dev/wscons/wsevent.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/wscons/wsevent.c b/sys/dev/wscons/wsevent.c index cb4f00d2df0..7838dee8a4f 100644 --- a/sys/dev/wscons/wsevent.c +++ b/sys/dev/wscons/wsevent.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsevent.c,v 1.14 2015/09/10 18:14:52 mpi Exp $ */ +/* $OpenBSD: wsevent.c,v 1.15 2016/01/12 16:21:09 stefan Exp $ */ /* $NetBSD: wsevent.c,v 1.16 2003/08/07 16:31:29 agc Exp $ */ /* @@ -136,7 +136,9 @@ wsevent_fini(struct wseventvar *ev) int wsevent_read(struct wseventvar *ev, struct uio *uio, int flags) { - int s, n, cnt, error; + int s, error; + u_int cnt; + size_t n; /* * Make sure we can return at least 1. @@ -169,7 +171,7 @@ wsevent_read(struct wseventvar *ev, struct uio *uio, int flags) n = howmany(uio->uio_resid, sizeof(struct wscons_event)); if (cnt > n) cnt = n; - error = uiomovei((caddr_t)&ev->q[ev->get], + error = uiomove((caddr_t)&ev->q[ev->get], cnt * sizeof(struct wscons_event), uio); n -= cnt; /* @@ -182,7 +184,7 @@ wsevent_read(struct wseventvar *ev, struct uio *uio, int flags) return (error); if (cnt > n) cnt = n; - error = uiomovei((caddr_t)&ev->q[0], + error = uiomove((caddr_t)&ev->q[0], cnt * sizeof(struct wscons_event), uio); ev->get = cnt; return (error); |