On 12.01.2011 15:12, Daniel Shahaf wrote: > Philip Martin wrote on Wed, Jan 12, 2011 at 11:01:12 +0000: >> danie...@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