Memory leak: Replaced a few "strcmp" with "=="

This commit is contained in:
Daniel Marjamäki 2008-12-05 18:39:23 +00:00
parent 963760b59f
commit 62e363daa5
1 changed files with 7 additions and 7 deletions

View File

@ -89,7 +89,7 @@ CheckMemoryLeakClass::AllocType CheckMemoryLeakClass::GetAllocationType( const T
0}; 0};
for ( unsigned int i = 0; mallocfunc[i]; i++ ) for ( unsigned int i = 0; mallocfunc[i]; i++ )
{ {
if ( strcmp(mallocfunc[i], tok2->aaaa()) == 0 ) if ( tok2->str() == mallocfunc[i] )
return Malloc; return Malloc;
} }
@ -111,7 +111,7 @@ CheckMemoryLeakClass::AllocType CheckMemoryLeakClass::GetAllocationType( const T
0}; 0};
for ( unsigned int i = 0; gmallocfunc[i]; i++ ) for ( unsigned int i = 0; gmallocfunc[i]; i++ )
{ {
if ( strcmp(gmallocfunc[i], tok2->aaaa()) == 0 ) if ( tok2->str() == gmallocfunc[i] )
return gMalloc; return gMalloc;
} }
@ -131,7 +131,7 @@ CheckMemoryLeakClass::AllocType CheckMemoryLeakClass::GetAllocationType( const T
std::list<AllocFunc>::const_iterator it = _listAllocFunc.begin(); std::list<AllocFunc>::const_iterator it = _listAllocFunc.begin();
while ( it != _listAllocFunc.end() ) while ( it != _listAllocFunc.end() )
{ {
if ( strcmp(tok2->aaaa(), it->funcname) == 0 ) if ( tok2->str() == it->funcname )
return it->alloctype; return it->alloctype;
++it; ++it;
} }