From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 21:01:28 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E51D106564A; Sun, 23 Nov 2008 21:01:28 +0000 (UTC) (envelope-from dwmalone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B8898FC08; Sun, 23 Nov 2008 21:01:28 +0000 (UTC) (envelope-from dwmalone@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mANL1SA0064276; Sun, 23 Nov 2008 21:01:28 GMT (envelope-from dwmalone@svn.freebsd.org) Received: (from dwmalone@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mANL1S1P064275; Sun, 23 Nov 2008 21:01:28 GMT (envelope-from dwmalone@svn.freebsd.org) Message-Id: <200811232101.mANL1S1P064275@svn.freebsd.org> From: David Malone Date: Sun, 23 Nov 2008 21:01:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185233 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2008 21:01:28 -0000 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 /*