Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e45423d7 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman
Browse files

staging: speakup: signedness bug in spk_ttyio_in_nowait()



On most of the common arches char is signed so it can't ever == 0xff.
Let's fix this by making it a u8.

Fixes: 6b9ad1c7 ("staging: speakup: add send_xchar, tiocmset and input functionality for tty")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarSamuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d70dd245
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -220,7 +220,7 @@ static unsigned char spk_ttyio_in(void)

static unsigned char spk_ttyio_in_nowait(void)
{
	char rv = ttyio_in(0);
	u8 rv = ttyio_in(0);

	return (rv == 0xff) ? 0 : rv;
}