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

[PATCH] [merge-tracking] remove redundant checks.

From: Kamesh Jayachandran <kamesh_at_collab.net>
Date: 2006-09-05 20:34:58 CEST

Hi All,
Find the attached patch and log.

With regards
Kamesh Jayachandran

[[[
Patch by: Kamesh Jayachandran <kamesh@collab.net>

Remove redundant checks.

* subversion/libsvn_fs_fs/fs_fs.c
  (index_txn_merge_info):
   svn_fs_fs__txn_mergeinfo always returns non-null minfoprops.
   So the 'if' check for non-null minfoprops is redundant.
]]]

Index: subversion/libsvn_fs_fs/fs_fs.c
===================================================================
--- subversion/libsvn_fs_fs/fs_fs.c (revision 21340)
+++ subversion/libsvn_fs_fs/fs_fs.c (working copy)
@@ -4073,29 +4073,26 @@
                      apr_pool_t *pool)
 {
   apr_hash_t *minfoprops;
+ apr_hash_index_t *hi;
 
   SVN_ERR(svn_fs_fs__txn_mergeinfo(&minfoprops, txn, pool));
- if (minfoprops)
- {
- apr_hash_index_t *hi;
       
- for (hi = apr_hash_first(pool, minfoprops);
- hi != NULL;
- hi = apr_hash_next(hi))
- {
- const char *minfopath;
- svn_string_t *minfostring;
- const void *key;
- void *val;
+ for (hi = apr_hash_first(pool, minfoprops);
+ hi != NULL;
+ hi = apr_hash_next(hi))
+ {
+ const char *minfopath;
+ svn_string_t *minfostring;
+ const void *key;
+ void *val;
           
- apr_hash_this(hi, &key, NULL, &val);
+ apr_hash_this(hi, &key, NULL, &val);
 
- minfopath = key;
- minfostring = val;
+ minfopath = key;
+ minfostring = val;
 
- SVN_ERR(index_path_merge_info(txn, new_rev, minfopath, minfostring,
- pool));
- }
+ SVN_ERR(index_path_merge_info(txn, new_rev, minfopath, minfostring,
+ pool));
     }
 
   return SVN_NO_ERROR;

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Sep 5 20:35:38 2006

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.