diff options
author | Stefan Kempf <stefan@cvs.openbsd.org> | 2016-01-08 07:54:03 +0000 |
---|---|---|
committer | Stefan Kempf <stefan@cvs.openbsd.org> | 2016-01-08 07:54:03 +0000 |
commit | db255e00710b296c43af670524843adaaa586977 (patch) | |
tree | 16e7e089c624c8048b8a7480bd425c64dbcb6b66 /sys | |
parent | 8de32fc6b82642d55af38642069d4e9ca29d1817 (diff) |
Use uiomove() instead of uiomovei().
Diff from Martin Natano, thanks!
ok kettenis@, deraadt@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/rnd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/rnd.c b/sys/dev/rnd.c index 6f30b9e47ae..819ce0dc730 100644 --- a/sys/dev/rnd.c +++ b/sys/dev/rnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rnd.c,v 1.177 2015/12/28 05:21:53 tedu Exp $ */ +/* $OpenBSD: rnd.c,v 1.178 2016/01/08 07:54:02 stefan Exp $ */ /* * Copyright (c) 2011 Theo de Raadt. @@ -840,7 +840,7 @@ randomread(dev_t dev, struct uio *uio, int ioflag) } while (ret == 0 && uio->uio_resid > 0) { - int n = ulmin(POOLBYTES, uio->uio_resid); + size_t n = ulmin(POOLBYTES, uio->uio_resid); if (myctx) { #ifndef KEYSTREAM_ONLY @@ -849,7 +849,7 @@ randomread(dev_t dev, struct uio *uio, int ioflag) chacha_encrypt_bytes(&lctx, buf, buf, n); } else arc4random_buf(buf, n); - ret = uiomovei(buf, n, uio); + ret = uiomove(buf, n, uio); if (ret == 0 && uio->uio_resid > 0) yield(); } @@ -872,9 +872,9 @@ randomwrite(dev_t dev, struct uio *uio, int flags) buf = malloc(POOLBYTES, M_TEMP, M_WAITOK); while (ret == 0 && uio->uio_resid > 0) { - int n = ulmin(POOLBYTES, uio->uio_resid); + size_t n = ulmin(POOLBYTES, uio->uio_resid); - ret = uiomovei(buf, n, uio); + ret = uiomove(buf, n, uio); if (ret != 0) break; while (n % sizeof(u_int32_t)) |