You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2015/03/18 11:16:04 UTC

svn commit: r1667478 - /subversion/trunk/subversion/svnrdump/load_editor.c

Author: julianfoad
Date: Wed Mar 18 10:16:04 2015
New Revision: 1667478

URL: http://svn.apache.org/r1667478
Log:
* subversion/svnrdump/load_editor.c
  (new_revision_record): Simplify.

Modified:
    subversion/trunk/subversion/svnrdump/load_editor.c

Modified: subversion/trunk/subversion/svnrdump/load_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnrdump/load_editor.c?rev=1667478&r1=1667477&r2=1667478&view=diff
==============================================================================
--- subversion/trunk/subversion/svnrdump/load_editor.c (original)
+++ subversion/trunk/subversion/svnrdump/load_editor.c Wed Mar 18 10:16:04 2015
@@ -392,7 +392,7 @@ new_revision_record(void **revision_bato
 {
   struct revision_baton *rb;
   struct parse_baton *pb;
-  apr_hash_index_t *hi;
+  const char *rev_str;
   svn_revnum_t head_rev;
 
   rb = apr_pcalloc(pool, sizeof(*rb));
@@ -401,14 +401,9 @@ new_revision_record(void **revision_bato
   rb->pb = pb;
   rb->db = NULL;
 
-  for (hi = apr_hash_first(pool, headers); hi; hi = apr_hash_next(hi))
-    {
-      const char *hname = apr_hash_this_key(hi);
-      const char *hval = apr_hash_this_val(hi);
-
-      if (strcmp(hname, SVN_REPOS_DUMPFILE_REVISION_NUMBER) == 0)
-        rb->rev = SVN_STR_TO_REV(hval);
-    }
+  rev_str = svn_hash_gets(headers, SVN_REPOS_DUMPFILE_REVISION_NUMBER);
+  if (rev_str)
+    rb->rev = SVN_STR_TO_REV(rev_str);
 
   SVN_ERR(svn_ra_get_latest_revnum(pb->session, &head_rev, pool));