subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bre...@apache.org
Subject svn commit: r1564444 - /subversion/trunk/subversion/libsvn_repos/reporter.c
Date Tue, 04 Feb 2014 19:48:14 GMT
Author: breser
Date: Tue Feb  4 19:48:14 2014
New Revision: 1564444

URL: http://svn.apache.org/r1564444
Log:
Followup to r1564215: Minor tweaks to variable scope and pool parentage.

* subversion/libsvn_repos/reporter.c
  (delta_dirs): Move iterpool into the if scope since it's not used outside it.
    Make iterpool a child of subpool and avoid an extra svn_pool_destroy()
    call on iterpool.

Modified:
    subversion/trunk/subversion/libsvn_repos/reporter.c

Modified: subversion/trunk/subversion/libsvn_repos/reporter.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/reporter.c?rev=1564444&r1=1564443&r2=1564444&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/reporter.c (original)
+++ subversion/trunk/subversion/libsvn_repos/reporter.c Tue Feb  4 19:48:14 2014
@@ -1143,7 +1143,6 @@ delta_dirs(report_baton_t *b, svn_revnum
   apr_hash_t *s_entries = NULL, *t_entries;
   apr_hash_index_t *hi;
   apr_pool_t *subpool = svn_pool_create(pool);
-  apr_pool_t *iterpool;
   apr_array_header_t *t_ordered_entries = NULL;
   int i;
 
@@ -1158,6 +1157,8 @@ delta_dirs(report_baton_t *b, svn_revnum
   if (requested_depth > svn_depth_empty
       || requested_depth == svn_depth_unknown)
     {
+      apr_pool_t *iterpool;
+
       /* Get the list of entries in each of source and target. */
       if (s_path && !start_empty)
         {
@@ -1169,7 +1170,7 @@ delta_dirs(report_baton_t *b, svn_revnum
       SVN_ERR(svn_fs_dir_entries(&t_entries, b->t_root, t_path, subpool));
 
       /* Iterate over the report information for this directory. */
-      iterpool = svn_pool_create(pool);
+      iterpool = svn_pool_create(subpool);
 
       while (1)
         {
@@ -1327,7 +1328,7 @@ delta_dirs(report_baton_t *b, svn_revnum
                                iterpool));
         }
 
-      svn_pool_destroy(iterpool);
+      /* iterpool is destroyed by destroying its parent (subpool) below */
     }
 
   svn_pool_destroy(subpool);



Mime
View raw message