Subject: Assming char == signed char?
To: None <tech-ports@NetBSD.ORG>
From: Andrew Cagney <firstname.lastname@example.org>
Date: 06/19/1995 10:45:31
Has the NetBSD source files ever been built on a machine where `char' is
really `unsigned char'? I have the feeling that it it hasn't been. I
ask because I've stumbled across code of the form:
if (tty->a_member_of_type_char == -1)
which, if char is unsigned, is a little pointless :-) (this was in the
kernel, exactly where is at home :-( ).
As an aside is the correct fix:
(signed char)tty->a_member_of_type_char == -1
tty->a_member_of_type_char == (char)(-1)