Skip to content

Commit

Permalink
Make the new CCEQ macro a little more like the old one - first do
Browse files Browse the repository at this point in the history
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
  • Loading branch information
dwmalone committed Nov 23, 2008
1 parent a5e2742 commit 9d7c8e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sys/sys/termios.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

/*
Expand Down

0 comments on commit 9d7c8e5

Please sign in to comment.