svn commit: r185233 - head/sys/sys

David Malone dwmalone at FreeBSD.org
Sun Nov 23 13:01:28 PST 2008


Author: dwmalone
Date: Sun Nov 23 21:01:28 2008
New Revision: 185233
URL: http://svn.freebsd.org/changeset/base/185233

Log:
  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

Modified:
  head/sys/sys/termios.h

Modified: head/sys/sys/termios.h
==============================================================================
--- head/sys/sys/termios.h	Sun Nov 23 20:27:03 2008	(r185232)
+++ head/sys/sys/termios.h	Sun Nov 23 21:01:28 2008	(r185233)
@@ -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
 
 /*


More information about the svn-src-all mailing list