aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-07-12 21:39:32 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-07-26 10:12:44 +0200
commit1894e04df791c0592993de3100e4fc682ec2ebe7 (patch)
treecb8cdcae28b0c0fffbfbd943321f476203fda7f4
parent4c3872279336b182fefa926c7e3e38152eb5fff4 (diff)
downloadnx-libs-1894e04df791c0592993de3100e4fc682ec2ebe7.tar.gz
nx-libs-1894e04df791c0592993de3100e4fc682ec2ebe7.tar.bz2
nx-libs-1894e04df791c0592993de3100e4fc682ec2ebe7.zip
nxcomp/src/Proxy.cpp: Fix index usage of nested loops.
-rw-r--r--nxcomp/src/Proxy.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/nxcomp/src/Proxy.cpp b/nxcomp/src/Proxy.cpp
index 32c32795c..5529de021 100644
--- a/nxcomp/src/Proxy.cpp
+++ b/nxcomp/src/Proxy.cpp
@@ -5530,7 +5530,7 @@ const char *Proxy::handleLoadAllStores(const char *loadPath, const char *loadNam
md5_append(md5StateStream, (const md5_byte_t *) loadName, strlen(loadName));
md5_finish(md5StateStream, md5DigestStream);
- for (int i = 0; i < MD5_LENGTH; i++)
+ for (unsigned int i = 0; i < MD5_LENGTH; i++)
{
if (md5DigestStream[i] != md5FromFile[i])
{
@@ -5539,17 +5539,17 @@ const char *Proxy::handleLoadAllStores(const char *loadPath, const char *loadNam
*logofs << "Proxy: PANIC! Bad checksum for cache file '"
<< cacheName << "'.\n" << logofs_flush;
- for (unsigned int i = 0; i < MD5_LENGTH; i++)
+ for (unsigned int j = 0; j < MD5_LENGTH; j++)
{
- sprintf(md5String + (i * 2), "%02X", md5FromFile[i]);
+ sprintf(md5String + (j * 2), "%02X", md5FromFile[j]);
}
*logofs << "Proxy: PANIC! Saved checksum is '"
<< md5String << "'.\n" << logofs_flush;
- for (unsigned int i = 0; i < MD5_LENGTH; i++)
+ for (unsigned int j = 0; j < MD5_LENGTH; j++)
{
- sprintf(md5String + (i * 2),"%02X", md5DigestStream[i]);
+ sprintf(md5String + (j * 2),"%02X", md5DigestStream[i]);
}
*logofs << "Proxy: PANIC! Calculated checksum is '"