Module Name: src
Committed By: kre
Date: Sun Sep 23 23:30:51 UTC 2018
Modified Files:
src/sys/dev/pad: pad.c
Log Message:
Open code min() so we don't need to find its prototype ...
To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 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.54 src/sys/dev/pad/pad.c:1.55
--- src/sys/dev/pad/pad.c:1.54 Sun Sep 23 21:18:30 2018
+++ src/sys/dev/pad/pad.c Sun Sep 23 23:30:51 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: pad.c,v 1.54 2018/09/23 21:18:30 nakayama Exp $ */
+/* $NetBSD: pad.c,v 1.55 2018/09/23 23:30:51 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.54 2018/09/23 21:18:30 nakayama Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.55 2018/09/23 23:30:51 kre Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -387,7 +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, min(uio->uio_resid, PAD_BLKSIZE));
+ err = pad_get_block(sc, &pb,
+ uio->uio_resid<PAD_BLKSIZE ? uio->uio_resid : PAD_BLKSIZE);
if (!err) {
getmicrotime(&sc->sc_last);
sc->sc_bytes_count += pb.pb_len;