Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pad Since we need an int paramater, and uio_resid is...
details: https://anonhg.NetBSD.org/src/rev/f3c0cbc33a34
branches: trunk
changeset: 433616:f3c0cbc33a34
user: kre <kre%NetBSD.org@localhost>
date: Sun Sep 23 23:34:45 2018 +0000
description:
Since we need an int paramater, and uio_resid is size_t cast it to int
to avoid warnings from the ever friendly compiler... (check that size if
in range was already made).
diffstat:
sys/dev/pad/pad.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (29 lines):
diff -r 86c9ba6c6e74 -r f3c0cbc33a34 sys/dev/pad/pad.c
--- a/sys/dev/pad/pad.c Sun Sep 23 23:30:51 2018 +0000
+++ b/sys/dev/pad/pad.c Sun Sep 23 23:34:45 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pad.c,v 1.55 2018/09/23 23:30:51 kre Exp $ */
+/* $NetBSD: pad.c,v 1.56 2018/09/23 23:34:45 kre Exp $ */
/*-
* Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.55 2018/09/23 23:30:51 kre Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.56 2018/09/23 23:34:45 kre Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -387,8 +387,8 @@
if (sc->sc_bytes_count >= BYTESTOSLEEP)
sc->sc_bytes_count -= BYTESTOSLEEP;
- err = pad_get_block(sc, &pb,
- uio->uio_resid<PAD_BLKSIZE ? uio->uio_resid : PAD_BLKSIZE);
+ err = pad_get_block(sc, &pb, uio->uio_resid < PAD_BLKSIZE ?
+ (int)uio->uio_resid : PAD_BLKSIZE);
if (!err) {
getmicrotime(&sc->sc_last);
sc->sc_bytes_count += pb.pb_len;
Home |
Main Index |
Thread Index |
Old Index