diff options
author | Thomas Moestl <tmm@FreeBSD.org> | 2003-07-05 01:31:30 +0000 |
---|---|---|
committer | Thomas Moestl <tmm@FreeBSD.org> | 2003-07-05 01:31:30 +0000 |
commit | 5ff9e59f711d33bc8207dc7f64dc0dcc0feb171e (patch) | |
tree | 535625fdec90f2ce2776147d77a8811ee1fcee05 /sys/dev/zs/zs.c | |
parent | de88922310093433486b241149c5c3e49d4308e6 (diff) | |
download | src-5ff9e59f711d33bc8207dc7f64dc0dcc0feb171e.tar.gz src-5ff9e59f711d33bc8207dc7f64dc0dcc0feb171e.zip |
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.
Notes
Notes:
svn path=/head/; revision=117248
Diffstat (limited to 'sys/dev/zs/zs.c')
-rw-r--r-- | sys/dev/zs/zs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/zs/zs.c b/sys/dev/zs/zs.c index 5a04a0e31fd9..26423e59c61a 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); |