From owner-svn-src-all@FreeBSD.ORG Tue May 19 02:12:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 305B3130; Tue, 19 May 2015 02:12:18 +0000 (UTC) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id D3B5A15B8; Tue, 19 May 2015 02:12:17 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 333E47836B7; Tue, 19 May 2015 11:48:07 +1000 (AEST) Date: Tue, 19 May 2015 11:48:00 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Pedro F. Giffuni" cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283088 - head/sys/ddb In-Reply-To: <201505182227.t4IMRljx078812@svn.freebsd.org> Message-ID: <20150519113755.U1840@besplex.bde.org> References: <201505182227.t4IMRljx078812@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=A5NVYcmG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=nOt2o3o-M51unNYgdDEA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 02:12:18 -0000 On Mon, 18 May 2015, Pedro F. Giffuni wrote: > Log: > ddb: stop boolean screaming. > > TRUE --> true > FALSE--> false > > Hinted by: NetBSD This is not just churn to a style regression, but a type mismatch. > Modified: head/sys/ddb/db_break.c > ============================================================================== > --- head/sys/ddb/db_break.c Mon May 18 22:14:06 2015 (r283087) > +++ head/sys/ddb/db_break.c Mon May 18 22:27:46 2015 (r283088) > @@ -155,12 +155,12 @@ db_find_breakpoint_here(db_addr_t addr) > return db_find_breakpoint(db_map_addr(addr), addr); > } > > -static boolean_t db_breakpoints_inserted = TRUE; > +static boolean_t db_breakpoints_inserted = true; This code hasn't been churned to use the boolean type. It still uses boolean_t, which is plain int. TRUE and FALSE go with this type. true and false go with the boolean type. This probably makes no difference, because TRUE happens to be implemented with the same value as true and there are lots of implicit versions between the types. The boolean type is almost useless since C's type system is too weak to distinguish between plain int used as a boolean and pure boolean. If it were stronger, then it would complain about all the implicit conversions between int and boolean, and the boolean type would be harder to use for other reasons. Bruce