summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authortmm <tmm@FreeBSD.org>2003-07-05 01:31:30 +0000
committertmm <tmm@FreeBSD.org>2003-07-05 01:31:30 +0000
commitd95773a9511d1f21ea1fcf0d621b3d5f922e5cee (patch)
tree535625fdec90f2ce2776147d77a8811ee1fcee05 /sys
parent07db328f44d4ee88faa7b57878ec245ee0608841 (diff)
downloadFreeBSD-src-d95773a9511d1f21ea1fcf0d621b3d5f922e5cee.zip
FreeBSD-src-d95773a9511d1f21ea1fcf0d621b3d5f922e5cee.tar.gz
Fix a signedness problem in zstty_cncheckc(): when no character is ready,
-1 should be returned, but it was assigned to an uint8_t (which is extended to an int to form the return value), causing 255 to be returned instead.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/zs/zs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/zs/zs.c b/sys/dev/zs/zs.c
index 5a04a0e..26423e5 100644
--- a/sys/dev/zs/zs.c
+++ b/sys/dev/zs/zs.c
@@ -943,7 +943,7 @@ zstty_cngetc(struct zstty_softc *sc)
static int
zstty_cncheckc(struct zstty_softc *sc)
{
- uint8_t c;
+ int c;
c = -1;
zstty_cnopen(sc);
OpenPOWER on IntegriCloud