[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r34627 - in trunk/subversion: include libsvn_client libsvn_fs_base/util libsvn_subr libsvn_wc

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: Tue, 09 Dec 2008 15:55:48 -0800

Greg Stein wrote:
> On Tue, Dec 9, 2008 at 10:01, Hyrum K. Wright <hyrum_at_hyrumwright.org> wrote:
>> ...
>> +++ trunk/subversion/libsvn_subr/checksum.c Tue Dec 9 10:01:12 2008 (r34627)
>> @@ -69,13 +69,13 @@ svn_checksum_create(svn_checksum_kind_t
>> }
>>
>> svn_checksum_t *
>> -svn_checksum__from_md5_digest(const unsigned char *digest,
>> - apr_pool_t *result_pool)
>> +svn_checksum__from_digest(const unsigned char *digest,
>> + svn_checksum_kind_t kind,
>> + apr_pool_t *result_pool)
>> {
>> - svn_checksum_t *checksum = svn_checksum_create(svn_checksum_md5,
>> - result_pool);
>> + svn_checksum_t *checksum = svn_checksum_create(kind, result_pool);
>>
>> - memcpy((unsigned char *)checksum->digest, digest, APR_MD5_DIGESTSIZE);
>> + checksum->digest = apr_pmemdup(result_pool, digest, DIGESTSIZE(kind));
>
> I'd suggest the original memcpy() rather than allocating more memory.

r34633.

-Hyrum

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=981927

Received on 2008-12-10 00:56:16 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.