subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1349357 - /subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
Date Tue, 12 Jun 2012 13:52:29 GMT
Author: stefan2
Date: Tue Jun 12 13:52:28 2012
New Revision: 1349357

URL: http://svn.apache.org/viewvc?rev=1349357&view=rev
Log:
Refine the r1349333 / r1349316 change with more idiomatic macro definitions.

* subversion/libsvn_fs_fs/fs_fs.c
  (RECOVERABLE_RETRY_LOOP): drop
  (RECOVERABLE_RETRY_TEST, RECOVERABLE_RETRY_NEXT): new macros
  (read_current, revision_proplist, get_and_increment_txn_key_body):
   use the new macros to guard retries

Modified:
    subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c

Modified: subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c?rev=1349357&r1=1349356&r2=1349357&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Tue Jun 12 13:52:28 2012
@@ -1479,12 +1479,15 @@ svn_fs_fs__upgrade(svn_fs_t *fs, apr_poo
           return svn_error_trace(err);                         \
       }                                                         \
   } else
-#define RECOVERABLE_RETRY_LOOP \
-  i < 10; i++
+#define RECOVERABLE_RETRY_TEST \
+  i < 10
+#define RECOVERABLE_RETRY_NEXT \
+  i++
 #else
 #define RETRY_RECOVERABLE(err, filehandle, expr)  SVN_ERR(expr)
 #define IGNORE_RECOVERABLE(err, expr) SVN_ERR(expr)
-#define RECOVERABLE_RETRY_LOOP ;
+#define RECOVERABLE_RETRY_TEST
+#define RECOVERABLE_RETRY_NEXT
 #endif
 
 /* Long enough to hold: "<svn_revnum_t> <node id> <copy id>\0"
@@ -1509,7 +1512,7 @@ read_current(const char *fname, char **b
 
   *buf = apr_palloc(pool, CURRENT_BUF_LEN);
   iterpool = svn_pool_create(pool);
-  for (i = 0; RECOVERABLE_RETRY_LOOP)
+  for (i = 0; RECOVERABLE_RETRY_TEST; RECOVERABLE_RETRY_NEXT)
     {
       svn_pool_clear(iterpool);
 
@@ -3207,7 +3210,7 @@ revision_proplist(apr_hash_t **proplist_
 
       proplist = apr_hash_make(pool);
       iterpool = svn_pool_create(pool);
-      for (i = 0; RECOVERABLE_RETRY_LOOP)
+      for (i = 0; RECOVERABLE_RETRY_TEST; RECOVERABLE_RETRY_NEXT)
         {
           svn_pool_clear(iterpool);
 
@@ -5039,7 +5042,7 @@ get_and_increment_txn_key_body(void *bat
   cb->txn_id = apr_palloc(cb->pool, MAX_KEY_SIZE);
 
   iterpool = svn_pool_create(pool);
-  for (i = 0; RECOVERABLE_RETRY_LOOP)
+  for (i = 0; RECOVERABLE_RETRY_TEST; RECOVERABLE_RETRY_NEXT)
     {
       svn_pool_clear(iterpool);
 



Mime
View raw message