Subject: Re: CVS commit: src/sys
To: None <source-changes@NetBSD.org>
From: Andrew Brown <atatat@atatdot.net>
List: source-changes
Date: 06/09/2005 23:25:04
On Thu, Jun 09, 2005 at 01:48:44PM -0500, David Young wrote:
>On Thu, Jun 09, 2005 at 09:06:06AM -0400, Andrew Brown wrote:
>> On Thu, Jun 09, 2005 at 01:07:34AM -0500, David Young wrote:
>> >On Thu, Jun 09, 2005 at 02:19:59AM +0000, Andrew Brown wrote:
>> >>
>> >> Module Name: src
>> >> Committed By: atatat
>> >> Date: Thu Jun 9 02:19:59 UTC 2005
>> >>
>> >> Modified Files:
>> >> src/sys/kern: init_sysctl.c kern_sysctl.c uipc_domain.c vfs_bio.c
>> >> src/sys/net: rtsock.c
>> >> src/sys/net80211: ieee80211.c
>> >> src/sys/netinet: ip_input.c tcp_usrreq.c
>> >> src/sys/nfs: nfs_vfsops.c
>> >> src/sys/sys: sysctl.h
>> >> src/sys/ufs/lfs: lfs_vfsops.c
>> >>
>> >> Log Message:
>> >> Properly fix the constipated lossage wrt -Wcast-qual and the sysctl
>> >> code. I know it's not the prettiest code, but it seems to work rather
>> >> well in spite of itself.
>> >
>> >Andrew,
>> >
>> >It seems like the const sysctlnodes are const for a reason;
>>
>> the nodes are const because only the core sysctl code should ever be
>> modifying it, not any of the helpers. the "enforecement" of const by
>> the compiler provides a certain degree of protection from this.
>
>Thank you for the in-depth explanation. I understand, now. Maybe remark
>about the const-ness in a source-code comment?
i'll see what i can come up with. :)
--
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org * "ah! i see you have the internet
twofsonet@graffiti.com (Andrew Brown) that goes *ping*!"
werdna@squooshy.com * "information is power -- share the wealth."