diff options
author | ed <ed@FreeBSD.org> | 2009-06-08 20:24:29 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-06-08 20:24:29 +0000 |
commit | 4e6c3f31a214591d931fc82f58787844a0117d45 (patch) | |
tree | 2822d624dc0600ba8b27d332398322afe6d6c05f | |
parent | 8ede8714ca613975ea1e8456a3168868425b93ab (diff) | |
download | FreeBSD-src-4e6c3f31a214591d931fc82f58787844a0117d45.zip FreeBSD-src-4e6c3f31a214591d931fc82f58787844a0117d45.tar.gz |
Use proper types in kbdmux_kbd_getc():
- The return value should be a signed integer, because -1 means failure.
- The c variable should be unsigned, to force it to be zero-extended
when returned.
Reported by: Andreas Tobler <andreast-list fgznet ch>
-rw-r--r-- | sys/dev/kbdmux/kbdmux.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/kbdmux/kbdmux.c b/sys/dev/kbdmux/kbdmux.c index 0f1fe42..990c8c3 100644 --- a/sys/dev/kbdmux/kbdmux.c +++ b/sys/dev/kbdmux/kbdmux.c @@ -181,10 +181,10 @@ kbdmux_kbd_putc(kbdmux_state_t *state, char c) state->ks_inq_length++; } -static char +static int kbdmux_kbd_getc(kbdmux_state_t *state) { - char c; + unsigned char c; if (state->ks_inq_length == 0) return (-1); |