Memory leak: Replaced a few "strcmp" with "=="
This commit is contained in:
parent
963760b59f
commit
62e363daa5
|
@ -89,7 +89,7 @@ CheckMemoryLeakClass::AllocType CheckMemoryLeakClass::GetAllocationType( const T
|
|||
0};
|
||||
for ( unsigned int i = 0; mallocfunc[i]; i++ )
|
||||
{
|
||||
if ( strcmp(mallocfunc[i], tok2->aaaa()) == 0 )
|
||||
if ( tok2->str() == mallocfunc[i] )
|
||||
return Malloc;
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,7 @@ CheckMemoryLeakClass::AllocType CheckMemoryLeakClass::GetAllocationType( const T
|
|||
0};
|
||||
for ( unsigned int i = 0; gmallocfunc[i]; i++ )
|
||||
{
|
||||
if ( strcmp(gmallocfunc[i], tok2->aaaa()) == 0 )
|
||||
if ( tok2->str() == gmallocfunc[i] )
|
||||
return gMalloc;
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,7 @@ CheckMemoryLeakClass::AllocType CheckMemoryLeakClass::GetAllocationType( const T
|
|||
std::list<AllocFunc>::const_iterator it = _listAllocFunc.begin();
|
||||
while ( it != _listAllocFunc.end() )
|
||||
{
|
||||
if ( strcmp(tok2->aaaa(), it->funcname) == 0 )
|
||||
if ( tok2->str() == it->funcname )
|
||||
return it->alloctype;
|
||||
++it;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue