1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-11 07:22:22 +00:00

A minor style tweak.

This commit is contained in:
Jung-uk Kim 2013-03-28 02:24:17 +00:00
parent e63f07fc4f
commit 3dc9002095
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=315430

View File

@ -1,5 +1,5 @@
--- src/core/CLucene/util/MD5Digester.cpp.orig 2011-03-16 20:21:07.000000000 -0400
+++ src/core/CLucene/util/MD5Digester.cpp 2013-03-27 21:18:10.000000000 -0400
+++ src/core/CLucene/util/MD5Digester.cpp 2013-03-27 22:19:22.000000000 -0400
@@ -72,18 +72,16 @@
// PrintMD5: Converts a completed md5 digest into a char* string.
char* PrintMD5(uint8_t md5Digest[16])
@ -7,13 +7,14 @@
- char chBuffer[256];
- char chEach[10];
+ const char toHex[] = "0123456789abcdef";
+ char chBuffer[16 * 2 + 1];
+ char chBuffer[sizeof(md5Digest) * 2 + 1];
int nCount;
- memset(chBuffer,0,256);
- memset(chEach, 0, 10);
-
for (nCount = 0; nCount < 16; nCount++)
- for (nCount = 0; nCount < 16; nCount++)
+ for (nCount = 0; nCount < sizeof(md5Digest); nCount++)
{
- cl_sprintf(chEach, 10, "%02x", md5Digest[nCount]);
- strncat(chBuffer, chEach, sizeof(chEach));