svn commit: r277860 - head/usr.sbin/sa

Dimitry Andric dim at FreeBSD.org
Thu Jan 29 10:37:20 UTC 2015


On 29 Jan 2015, at 09:23, John-Mark Gurney <jmg at funkthat.com> 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20150129/85717e5d/attachment.sig>


More information about the svn-src-all mailing list