Code duplication cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39827 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -275,11 +275,9 @@ ElfFile::Init(const char* fileName)
|
|||||||
ElfSection*
|
ElfSection*
|
||||||
ElfFile::GetSection(const char* name)
|
ElfFile::GetSection(const char* name)
|
||||||
{
|
{
|
||||||
for (SectionList::Iterator it = fSections.GetIterator();
|
ElfSection* section = FindSection(name);
|
||||||
ElfSection* section = it.Next();) {
|
if (section != NULL && section->Load() == B_OK)
|
||||||
if (strcmp(section->Name(), name) == 0)
|
return section;
|
||||||
return section->Load() == B_OK ? section : NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user