From owner-svn-src-head@FreeBSD.ORG Thu Jan 29 10:37:20 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A68CC6CD; Thu, 29 Jan 2015 10:37:20 +0000 (UTC) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6007C3CA; Thu, 29 Jan 2015 10:37:20 +0000 (UTC) Received: from coleburn.avinity.tv (unknown [77.243.161.229]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 06F6F5C2E; Thu, 29 Jan 2015 11:37:14 +0100 (CET) Subject: Re: svn commit: r277860 - head/usr.sbin/sa Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_D586DE3B-B393-4D5A-BE7B-54D8E718D59A"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.5b4 (05244f0+) From: Dimitry Andric In-Reply-To: <20150129082346.GC27103@funkthat.com> Date: Thu, 29 Jan 2015 11:37:10 +0100 Message-Id: <83A87E21-5D5D-4731-BF49-9310614FB238@FreeBSD.org> References: <201501282222.t0SMMoHU095511@svn.freebsd.org> <20150129082346.GC27103@funkthat.com> To: John-Mark Gurney X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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: Thu, 29 Jan 2015 10:37:20 -0000 --Apple-Mail=_D586DE3B-B393-4D5A-BE7B-54D8E718D59A Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 29 Jan 2015, at 09:23, John-Mark Gurney wrote: > > Dimitry Andric wrote this message on Wed, Jan 28, 2015 at 22:22 +0000: >> Replace the VERSION_KEY define with a writable char array, so no const >> qualifier needs to be dropped anymore. > > You do realize that you should juse use __DECONST for this instead? > > This moves the data from .rodata into .data making it writable, and > also means that bad programs could end up stop working, instead of > faulting when someone tries to change the version string... I don't see the risk here, the db api does not actually modify the incoming key (the API is just badly designed). But if you think it is nicer to use __DECONST, feel free to change it. -Dimitry --Apple-Mail=_D586DE3B-B393-4D5A-BE7B-54D8E718D59A Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.26 iEYEARECAAYFAlTKDVoACgkQsF6jCi4glqMcoACfXHpsvTNYnQvm9oQApkywkEHC W5sAoKdeQ6NiskFl7vBa51ooRplMo088 =j+6C -----END PGP SIGNATURE----- --Apple-Mail=_D586DE3B-B393-4D5A-BE7B-54D8E718D59A--