[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1057088 - in /subversion/trunk/subversion: libsvn_fs_base/bdb/env.c libsvn_ra_svn/cyrus_auth.c libsvn_subr/io.c libsvn_subr/sqlite.c

From: Branko Čibej <brane_at_xbc.nu>
Date: Wed, 12 Jan 2011 15:54:48 +0100

On 12.01.2011 15:12, Daniel Shahaf wrote:
> Philip Martin wrote on Wed, Jan 12, 2011 at 11:01:12 +0000:
>> danielsh_at_apache.org writes:
>>
>>> Author: danielsh
>>> Date: Mon Jan 10 06:03:30 2011
>>> New Revision: 1057088
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1057088&view=rev
>>> Log:
>>> Initialize svn_atomic_t's to zero, per svn_atomic__init_once().
>> That is redundant, strict speaking, because static variables are
>> initialised to zero if not explicitly initialised to something else.
>>
> I didn't remember that.
>
> I don't mind to revert the change if people are comfortable with our
> coding style relying on remembering which kinds of variables C does or
> doesn't initialize to zero when they're not explicitly initialized...
> (i.e., defensive coding)

's true that static (and in fact all global) storage is default-inited
to 0 ... but there's no harm in putting the initializer there. IMO it's
better to have it, if only for the sake of clarity.

-- Brane
Received on 2011-01-12 15:55:32 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.