Module Name: src
Committed By: kre
Date: Sun Sep 23 23:34:45 UTC 2018
Modified Files:
src/sys/dev/pad: pad.c
Log Message:
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).
To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/dev/pad/pad.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pad/pad.c
diff -u src/sys/dev/pad/pad.c:1.55 src/sys/dev/pad/pad.c:1.56
--- src/sys/dev/pad/pad.c:1.55 Sun Sep 23 23:30:51 2018
+++ src/sys/dev/pad/pad.c Sun Sep 23 23:34:45 2018
@@ -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 <[email protected]>
@@ -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 @@ pad_read(dev_t dev, struct uio *uio, int
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;