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

Re: [PATCH] for some of issue #649

From: Branko Čibej <brane_at_xbc.nu>
Date: 2003-01-07 00:40:55 CET

Karl Fogel wrote:

>+ struct apr_md5_ctx_t context;
>+ unsigned char digest[MD5_DIGESTSIZE];
>+ /* Get a checksum digest for the empty string. */
>+ apr_md5_init (&context);
>+ apr_md5_final (digest, &context);

You're doing this in two separate places in the code. Why not just
calculate that checksum once, and use a statically initialized array?
It's not as if the MD5 algorithm is about to change.

$ python
Python 2.2.2 (#37, Oct 14 2002, 17:02:34) [MSC 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import md5
>>> m = md5.new()
>>> m.digest()

And there's your array initializer.

Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jan 7 00:43:57 2003

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.