Date: Sun, 23 Nov 2008 21:01:28 +0000 (UTC) From: David Malone <dwmalone@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r185233 - head/sys/sys Message-ID: <200811232101.mANL1S1P064275@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811232101.mANL1S1P064275>