You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2011/07/15 09:37:04 UTC
svn commit: r1146991 -
/subversion/branches/fs-progress/subversion/libsvn_repos/dump.c
Author: danielsh
Date: Fri Jul 15 07:37:04 2011
New Revision: 1146991
URL: http://svn.apache.org/viewvc?rev=1146991&view=rev
Log:
On the fs-progress branch, rework a code section for clarity.
No functional change.
Suggested by: gstein
* subversion/libsvn_repos/dump.c
(svn_repos_verify_fs2): Simplify if/then chain for readability.
Modified:
subversion/branches/fs-progress/subversion/libsvn_repos/dump.c
Modified: subversion/branches/fs-progress/subversion/libsvn_repos/dump.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-progress/subversion/libsvn_repos/dump.c?rev=1146991&r1=1146990&r2=1146991&view=diff
==============================================================================
--- subversion/branches/fs-progress/subversion/libsvn_repos/dump.c (original)
+++ subversion/branches/fs-progress/subversion/libsvn_repos/dump.c Fri Jul 15 07:37:04 2011
@@ -1307,21 +1307,25 @@ svn_repos_verify_fs2(svn_repos_t *repos,
/* Verify global/auxiliary data before verifying revisions. */
if (start_rev == 0)
{
- struct progress_to_notify_baton ptnb = {
- notify_func, notify_baton, NULL
- };
+ struct progress_to_notify_baton ptnb;
- /* Create a notify object that we can reuse within the callback. */
if (notify_func)
- ptnb.notify = svn_repos_notify_create(svn_repos_notify_verify_aux_progress,
- iterpool);
-
- /* We're starting. */
- if (notify_func)
- notify_func(notify_baton,
- svn_repos_notify_create(svn_repos_notify_verify_aux_start,
- iterpool),
- iterpool);
+ {
+ /* Stash NOTIFY_FUNC for the callback. */
+ ptnb.notify_func = notify_func;
+ ptnb.notify_baton = notify_baton;
+
+ /* Create a notify object that we can reuse within the callback. */
+ ptnb.notify =
+ svn_repos_notify_create(svn_repos_notify_verify_aux_progress,
+ iterpool);
+
+ /* We're starting. */
+ notify_func(notify_baton,
+ svn_repos_notify_create(svn_repos_notify_verify_aux_start,
+ iterpool),
+ iterpool);
+ }
/* Do the work. */
SVN_ERR(svn_fs_verify(svn_fs_path(fs, iterpool),
@@ -1329,12 +1333,14 @@ svn_repos_verify_fs2(svn_repos_t *repos,
cancel_func, cancel_baton,
iterpool));
- /* We're finished. */
if (notify_func)
- notify_func(notify_baton,
- svn_repos_notify_create(svn_repos_notify_verify_aux_end,
- iterpool),
- iterpool);
+ {
+ /* We're finished. */
+ notify_func(notify_baton,
+ svn_repos_notify_create(svn_repos_notify_verify_aux_end,
+ iterpool),
+ iterpool);
+ }
}