Make the new CCEQ macro a little more like the old one - first do

the comparison between c and val and then compare val to _POSIX_VDISABLE.
This avoids comparing c (which is usually of type char) to
_POSIX_VDISABLE (which has value 0xff and may not be representable
as a char).

Reviewed by:	ed
This commit is contained in:
David Malone 2008-11-23 21:01:28 +00:00
parent a5e27424dd
commit 9d7c8e5771

View file

@ -234,7 +234,7 @@ struct termios {
#ifndef _KERNEL
#ifndef _POSIX_SOURCE
#define CCEQ(val, c) ((c) != _POSIX_VDISABLE && (c) == (val))
#define CCEQ(val, c) ((c) == (val) && (val) != _POSIX_VDISABLE)
#endif
/*