summaryrefslogtreecommitdiff
path: root/sys/dev/isa
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2015-02-10 22:50:13 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2015-02-10 22:50:13 +0000
commitb086a263435b827564806ff84917b37fcd8caa2e (patch)
tree37732243853551a8d514bcb49c32edc1c436d6be /sys/dev/isa
parentee0e7e8065eba041c92189ba95923fb9f79ae86b (diff)
Trivial conversion to uiomove()
Diffstat (limited to 'sys/dev/isa')
-rw-r--r--sys/dev/isa/spkr.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/isa/spkr.c b/sys/dev/isa/spkr.c
index 6135afac7bd..435a048e655 100644
--- a/sys/dev/isa/spkr.c
+++ b/sys/dev/isa/spkr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spkr.c,v 1.18 2015/02/10 21:56:09 miod Exp $ */
+/* $OpenBSD: spkr.c,v 1.19 2015/02/10 22:50:12 miod Exp $ */
/* $NetBSD: spkr.c,v 1.1 1998/04/15 20:26:18 drochner Exp $ */
/*
@@ -79,7 +79,7 @@ static void tone(u_int, u_int);
static void rest(int);
static void playinit(void);
static void playtone(int, int, int);
-static void playstring(char *, int);
+static void playstring(char *, size_t);
/* emit tone of frequency hz for given number of ticks */
static void
@@ -210,7 +210,7 @@ playtone(int pitch, int value, int sustain)
/* interpret and play an item from a notation string */
static void
-playstring(char *cp, int slen)
+playstring(char *cp, size_t slen)
{
int pitch, lastpitch = OCTAVE_NOTES * DFLT_OCTAVE;
@@ -422,7 +422,7 @@ spkropen(dev_t dev, int flags, int mode, struct proc *p)
int
spkrwrite(dev_t dev, struct uio *uio, int flags)
{
- int n;
+ size_t n;
int error;
#ifdef SPKRDEBUG
printf("spkrwrite: entering with dev = %x, count = %d\n",
@@ -432,8 +432,8 @@ spkrwrite(dev_t dev, struct uio *uio, int flags)
if (minor(dev) != 0)
return (ENXIO);
else {
- n = min(DEV_BSIZE, uio->uio_resid);
- error = uiomovei(spkr_inbuf, n, uio);
+ n = ulmin(DEV_BSIZE, uio->uio_resid);
+ error = uiomove(spkr_inbuf, n, uio);
if (!error)
playstring((char *)spkr_inbuf, n);
return (error);