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

Re: svn commit: r27807 - trunk/subversion/mod_dav_svn

From: Blair Zajac <blair_at_orcaware.com>
Date: 2007-11-14 08:40:47 CET

That idiom is used through out the source code. It appears to be safe in all
the compilers we build with.

For example, line 808 of subversion/libsvn_client/export.c:

   if (svn_path_is_url(from) ||
       ! (revision->kind == svn_opt_revision_base ||
          revision->kind == svn_opt_revision_committed ||
          revision->kind == svn_opt_revision_working ||
          revision->kind == svn_opt_revision_unspecified))
     {
       svn_revnum_t revnum;
       svn_ra_session_t *ra_session;
       svn_node_kind_t kind;
       struct edit_baton *eb = apr_pcalloc(pool, sizeof(*eb));
       const char *repos_root_url;

Blair

Kamesh Jayachandran wrote:
> Will it work on all compilers? I mean 'declaration after a function
> call' rule.
>
> With regards
> Kamesh Jayachandran
>
> dlr@tigris.org wrote:
>> Author: dlr
>> Date: Tue Nov 13 21:28:52 2007
>> New Revision: 27807
>>
>> Log:
>> Stylistic tweak.
>>
>> * subversion/mod_dav_svn/repos.c
>> (capabilities_as_list): Swap order of local variable declaration.
>>
>>
>> Modified:
>> trunk/subversion/mod_dav_svn/repos.c
>>
>> Modified: trunk/subversion/mod_dav_svn/repos.c
>> URL:
>> http://svn.collab.net/viewvc/svn/trunk/subversion/mod_dav_svn/repos.c?pathrev=27807&r1=27806&r2=27807
>>
>> ==============================================================================
>>
>> --- trunk/subversion/mod_dav_svn/repos.c (original)
>> +++ trunk/subversion/mod_dav_svn/repos.c Tue Nov 13 21:28:52 2007
>> @@ -1441,9 +1441,9 @@
>> static apr_array_header_t *
>> capabilities_as_list(apr_hash_t *capabilities, apr_pool_t *pool)
>> {
>> - apr_hash_index_t *hi;
>> apr_array_header_t *list = apr_array_make(pool,
>> apr_hash_count(capabilities),
>> sizeof(char *));
>> + apr_hash_index_t *hi;
>>
>> for (hi = apr_hash_first(pool, capabilities); hi; hi =
>> apr_hash_next(hi))
>> {
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
>> For additional commands, e-mail: svn-help@subversion.tigris.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Nov 14 08:41:11 2007

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.