subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bl...@apache.org
Subject svn commit: r1327747 - /subversion/trunk/subversion/libsvn_subr/checksum.c
Date Wed, 18 Apr 2012 23:55:29 GMT
Author: blair
Date: Wed Apr 18 23:55:28 2012
New Revision: 1327747

URL: http://svn.apache.org/viewvc?rev=1327747&view=rev
Log:
Rename checksum_create() to checksum_create_without_digest().

This is in preparation for a new checksum_create().  The new name is
much clearer that one is getting an incomplete initialization.

Suggested by: gstein

* subversion/libsvn_subr/checksum.c
  (checksum_create_without_digest):
    Renamed from checksum_create_without_digest().  Update all callers.

Modified:
    subversion/trunk/subversion/libsvn_subr/checksum.c

Modified: subversion/trunk/subversion/libsvn_subr/checksum.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/checksum.c?rev=1327747&r1=1327746&r2=1327747&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/checksum.c (original)
+++ subversion/trunk/subversion/libsvn_subr/checksum.c Wed Apr 18 23:55:28 2012
@@ -59,9 +59,9 @@ validate_kind(svn_checksum_kind_t kind)
 /* Create a svn_checksum_t with everything but the contents of the
    digest populated. */
 static svn_checksum_t *
-checksum_create(svn_checksum_kind_t kind,
-                apr_size_t digest_size,
-                apr_pool_t *pool)
+checksum_create_without_digest(svn_checksum_kind_t kind,
+                               apr_size_t digest_size,
+                               apr_pool_t *pool)
 {
   /* Use apr_palloc() instead of apr_pcalloc() so that the digest
    * contents are only set once by the caller. */
@@ -90,7 +90,7 @@ svn_checksum_create(svn_checksum_kind_t 
         return NULL;
     }
 
-  checksum = checksum_create(kind, digest_size, pool);
+  checksum = checksum_create_without_digest(kind, digest_size, pool);
   memset((unsigned char *) checksum->digest, 0, digest_size);
   return checksum;
 }
@@ -99,8 +99,9 @@ svn_checksum_t *
 svn_checksum__from_digest_md5(const unsigned char *digest,
                               apr_pool_t *result_pool)
 {
-  svn_checksum_t *checksum = checksum_create(svn_checksum_md5,
-                                             APR_MD5_DIGESTSIZE, result_pool);
+  svn_checksum_t *checksum = checksum_create_without_digest(svn_checksum_md5,
+                                                            APR_MD5_DIGESTSIZE,
+                                                            result_pool);
   memcpy((unsigned char *)checksum->digest, digest, APR_MD5_DIGESTSIZE);
   return checksum;
 }
@@ -109,8 +110,9 @@ svn_checksum_t *
 svn_checksum__from_digest_sha1(const unsigned char *digest,
                                apr_pool_t *result_pool)
 {
-  svn_checksum_t *checksum = checksum_create(svn_checksum_sha1,
-                                             APR_SHA1_DIGESTSIZE, result_pool);
+  svn_checksum_t *checksum = checksum_create_without_digest(
+                               svn_checksum_sha1, APR_SHA1_DIGESTSIZE,
+                               result_pool);
   memcpy((unsigned char *)checksum->digest, digest, APR_SHA1_DIGESTSIZE);
   return checksum;
 }
@@ -305,7 +307,7 @@ svn_checksum_dup(const svn_checksum_t *c
         break;
     }
 
-  out = checksum_create(checksum->kind, digest_size, pool);
+  out = checksum_create_without_digest(checksum->kind, digest_size, pool);
   memcpy((unsigned char *)out->digest, checksum->digest, digest_size);
   return out;
 }
@@ -368,7 +370,7 @@ svn_checksum_empty_checksum(svn_checksum
         return NULL;
     }
 
-  checksum = checksum_create(kind, digest_size, pool);
+  checksum = checksum_create_without_digest(kind, digest_size, pool);
   memcpy((unsigned char *)checksum->digest, digest, digest_size);
   return checksum;
 }



Mime
View raw message