From owner-svn-src-head@FreeBSD.ORG Tue May 19 03:50:08 2015 Return-Path: Delivered-To: svn-src-head@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 59C3461C for ; Tue, 19 May 2015 03:50:08 +0000 (UTC) Received: from nm19-vm0.bullet.mail.bf1.yahoo.com (nm19-vm0.bullet.mail.bf1.yahoo.com [98.139.213.162]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A3021125 for ; Tue, 19 May 2015 03:50:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1432007399; bh=WMIXdxPZDAsbiudlAV2BrsWTyLb7+v6ilxvFRAnD2F4=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject; b=mzYfo1K3kQsuuKFMpYHOj6eDXtJ+YruF/qYhekRCPUctciSAph9hkjx+8ox/BRYV7lRAChnEkbQEEt8O7DkyHG1hvs8PSbbSiJlmFk7PR4zYd55dHPH6NoTYJgMLOKb6wFY2PZZ7kzO/+PjklNp4bEn3GWO/Qg4Nbk6/cEL2YwgjDjWOP/vNalg/DAIbppNCRSrjrTXySj1VhmPzVLdi4lBsRyG/OvRJHXzd7/UdySqVfHKVBgjCSXTefkPHOywUsYPjti8tVabU4nDW7Q5f8srFgKjo0KvHl+635+C3RpVcrAJG+gVc3HKgcl07bQTiLPckZoMiLCY/kJ7M2wETrA== Received: from [66.196.81.174] by nm19.bullet.mail.bf1.yahoo.com with NNFMP; 19 May 2015 03:49:59 -0000 Received: from [98.139.211.203] by tm20.bullet.mail.bf1.yahoo.com with NNFMP; 19 May 2015 03:49:59 -0000 Received: from [127.0.0.1] by smtp212.mail.bf1.yahoo.com with NNFMP; 19 May 2015 03:49:59 -0000 X-Yahoo-Newman-Id: 916666.12304.bm@smtp212.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: _jOScsgVM1l7vaGBj7y0wOBVKvo2GgIiHJgD4XI2nj6Am9s Lijf5hRh5KlaxutKaXs9hdRHIPA3TedF2JdzQ69d0zmCafM_xah0dWvrZHPA iQsKYbmCvdX3rHe9u56TMJww2oZpyx3GfKvP1nRdbcKQ.ySHn7LwAIkyJ0uE DmqjSBQAiyz2UFQHKBvz.KAhTuRBD8UvCWyUs7UPVbyrl3lqiXFjt_LWbvoJ MNSS_CSdH3F5SWzIW7RJiW51KR_uVOdoAMZ0NHWLOe3xJO5bsFUxGaM.aXm9 cJYtXlK6mlD6HlgwxvaAiyS5iMZW6jAT029wM2xumS5uABefws10V3Be2bd6 M5Wj7YqJH53YAvQY6wXe2u1WV8lyw_k2pbReM0S7nUqPxkw89raric5wxvX5 0k53rutAXRuVTCXRXN8wvXCy.F7yKS5TlarbekrKfxAdmojIYWATnzTjhxsf uL2.wLBuIlRg4uRKFCbmE1AGL0x_tqBaGe.8.7inCieuajlAKUgnK8IK1_VX Yv_2TlPfPXdTTMr6QsYA18EvHZqX.wFWH X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: svn commit: r283088 - head/sys/ddb From: Pedro Giffuni In-Reply-To: <20150519113755.U1840@besplex.bde.org> Date: Mon, 18 May 2015 22:49:57 -0500 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <406A7AE3-1891-4B2C-B917-14C150EBBAB5@FreeBSD.org> References: <201505182227.t4IMRljx078812@svn.freebsd.org> <20150519113755.U1840@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Tue, 19 May 2015 03:50:08 -0000 > Il giorno 18/mag/2015, alle ore 20:48, Bruce Evans = ha scritto: >=20 > On Mon, 18 May 2015, Pedro F. Giffuni wrote: >=20 >> Log: >> ddb: stop boolean screaming. >>=20 >> TRUE --> true >> FALSE--> false >>=20 >> Hinted by: NetBSD >=20 > This is not just churn to a style regression, but a type mismatch. >=20 It is an attempt to reduce differences with NetBSD. One of the complaints of hear from newcomers to the ddb code is that the format is old-fashioned (it still had pre-ANSI headers not long ago) and unmaintained. >> Modified: head/sys/ddb/db_break.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- 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); >> } >>=20 >> -static boolean_t db_breakpoints_inserted =3D TRUE; >> +static boolean_t db_breakpoints_inserted =3D true; >=20 > 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. >=20 Yes, I noticed the return types are still ints. It doesn=E2=80=99t look = difficult to convert it to use a real boolean type. In any case, I would prefer = to go forward (using bool) instead of reverting this change. > 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. >=20 And I would like that to happen, but it would probably break a lot of = legacy code. I thought boolean_t was a transition type. Pedro.