From 4e6c3f31a214591d931fc82f58787844a0117d45 Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 8 Jun 2009 20:24:29 +0000 Subject: 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 --- sys/dev/kbdmux/kbdmux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/kbdmux') 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); -- cgit v1.1