[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: Philip Martin <philip.martin_at_wandisco.com>
Date: Wed, 12 Jan 2011 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.

> Modified: subversion/trunk/subversion/libsvn_ra_svn/cyrus_auth.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_svn/cyrus_auth.c?rev=1057088&r1=1057087&r2=1057088&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_ra_svn/cyrus_auth.c (original)
> +++ subversion/trunk/subversion/libsvn_ra_svn/cyrus_auth.c Mon Jan 10 06:03:30 2011
> @@ -54,8 +54,9 @@
> * in atexit processing, at which point we are already running in
> * single threaded mode.
> */
> -volatile svn_atomic_t svn_ra_svn__sasl_status;
> +volatile svn_atomic_t svn_ra_svn__sasl_status = 0;

That is a static variable, explicitly marking it static might be more
useful than explicitly marking it 0.

>
> +/* Initialized by svn_ra_svn__sasl_common_init(). */
> static volatile svn_atomic_t sasl_ctx_count;

That comment is wrong, sasl_ctx_count is static and so is initialised to
0.

-- 
Philip
Received on 2011-01-12 12:02:04 CET

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