From d95773a9511d1f21ea1fcf0d621b3d5f922e5cee Mon Sep 17 00:00:00 2001 From: tmm Date: Sat, 5 Jul 2003 01:31:30 +0000 Subject: 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. --- sys/dev/zs/zs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/dev/zs') 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); -- cgit v1.1