subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i...@apache.org
Subject svn commit: r1756362 - /subversion/trunk/subversion/libsvn_repos/config_pool.c
Date Mon, 15 Aug 2016 08:14:55 GMT
Author: ivan
Date: Mon Aug 15 08:14:55 2016
New Revision: 1756362

URL: http://svn.apache.org/viewvc?rev=1756362&view=rev
Log:
Use svn_checksum() instead of svn_stream_from_stringbuf() +
svn_stream_checksum() to calculate SHA1 checksum of in-memory buffer.

* subversion/libsvn_repos/config_pool.c
  (auto_parse): Use svn_checksum().

Modified:
    subversion/trunk/subversion/libsvn_repos/config_pool.c

Modified: subversion/trunk/subversion/libsvn_repos/config_pool.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/config_pool.c?rev=1756362&r1=1756361&r2=1756362&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/config_pool.c (original)
+++ subversion/trunk/subversion/libsvn_repos/config_pool.c Mon Aug 15 08:14:55 2016
@@ -199,9 +199,8 @@ auto_parse(svn_config_t **cfg,
   apr_pool_t *cfg_pool;
 
   /* calculate SHA1 over the whole file contents */
-  SVN_ERR(svn_stream_checksum(
-            &checksum, svn_stream_from_stringbuf(contents, scratch_pool),
-            svn_checksum_sha1, scratch_pool, scratch_pool));
+  SVN_ERR(svn_checksum(&checksum, svn_checksum_sha1,
+                       contents->data, contents->len, scratch_pool));
 
   /* return reference to suitable config object if that already exists */
   *key = checksum_as_key(checksum, result_pool);



Mime
View raw message