- phase 2 of cppcheck verbose fixes

This commit is contained in:
Mark Vejvoda
2011-09-01 01:11:23 +00:00
parent 29b610344d
commit 57afc2d715
55 changed files with 511 additions and 149 deletions

View File

@@ -153,7 +153,7 @@ bool Checksum::addFileToSum(const string &path) {
memset(buf,0,bufSize);
if(fgets(buf, bufSize, file) != NULL) {
//addByte(byte);
for(int i = 0; buf[i] != 0 && i < bufSize; i++) {
for(int i = 0; i < bufSize && buf[i] != 0; i++) {
// Ignore Spaces in XML files as they are
// ONLY for formatting
if(isXMLFile == true) {
@@ -196,7 +196,7 @@ int32 Checksum::getSum() {
Checksum newResult;
for(std::map<string,int32>::iterator iterMap = fileList.begin();
iterMap != fileList.end(); iterMap++) {
iterMap != fileList.end(); ++iterMap) {
MutexSafeWrapper safeMutexSocketDestructorFlag(&Checksum::fileListCacheSynchAccessor,string(__FILE__) + "_" + intToStr(__LINE__));
if(Checksum::fileListCache.find(iterMap->first) == Checksum::fileListCache.end()) {