cppcheck: The '&&' should be '||' when checking if a check should be called

This commit is contained in:
Daniel Marjamäki 2009-01-22 21:20:40 +00:00
parent e691ade8e6
commit de2675b46f
1 changed files with 2 additions and 2 deletions

View File

@ -313,7 +313,7 @@ void CppCheck::checkFile(const std::string &code, const char FileName[])
// Memory leak
CheckMemoryLeakClass checkMemoryLeak(&_tokenizer, _settings, this);
if (ErrorMessage::memleak() && ErrorMessage::mismatchAllocDealloc())
if (ErrorMessage::memleak() || ErrorMessage::mismatchAllocDealloc())
checkMemoryLeak.CheckMemoryLeak();
// Check that all class constructors are ok.
@ -325,7 +325,7 @@ void CppCheck::checkFile(const std::string &code, const char FileName[])
checkClass.virtualDestructor();
// Array index out of bounds / Buffer overruns..
if (ErrorMessage::arrayIndexOutOfBounds(_settings) && ErrorMessage::bufferOverrun(_settings))
if (ErrorMessage::arrayIndexOutOfBounds(_settings) || ErrorMessage::bufferOverrun(_settings))
checkBufferOverrun.bufferOverrun();
// Dangerous functions, such as 'gets' and 'scanf'