subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i...@apache.org
Subject svn commit: r1715947 - /subversion/trunk/subversion/libsvn_fs_fs/cached_data.c
Date Mon, 23 Nov 2015 20:35:56 GMT
Author: ivan
Date: Mon Nov 23 20:35:55 2015
New Revision: 1715947

URL: http://svn.apache.org/viewvc?rev=1715947&view=rev
Log:
Refactor code to use standard error handling pattern. No function changes
intended.

* subversion/libsvn_fs_fs/cached_data.c
  (get_node_revision_body): Use 'if/else if' instead of nested 'if' to handle
   specific error code.

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

Modified: subversion/trunk/subversion/libsvn_fs_fs/cached_data.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/cached_data.c?rev=1715947&r1=1715946&r2=1715947&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/cached_data.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/cached_data.c Mon Nov 23 20:35:55 2015
@@ -425,14 +425,13 @@ get_node_revision_body(node_revision_t *
                              scratch_pool),
                              APR_READ | APR_BUFFERED, APR_OS_DEFAULT,
                              scratch_pool);
-      if (err)
+      if (err && APR_STATUS_IS_ENOENT(err->apr_err))
+        {
+          svn_error_clear(err);
+          return svn_error_trace(err_dangling_id(fs, id));
+        }
+      else if (err)
         {
-          if (APR_STATUS_IS_ENOENT(err->apr_err))
-            {
-              svn_error_clear(err);
-              return svn_error_trace(err_dangling_id(fs, id));
-            }
-
           return svn_error_trace(err);
         }
 



Mime
View raw message