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*
|
||||
ElfFile::GetSection(const char* name)
|
||||
{
|
||||
for (SectionList::Iterator it = fSections.GetIterator();
|
||||
ElfSection* section = it.Next();) {
|
||||
if (strcmp(section->Name(), name) == 0)
|
||||
return section->Load() == B_OK ? section : NULL;
|
||||
}
|
||||
ElfSection* section = FindSection(name);
|
||||
if (section != NULL && section->Load() == B_OK)
|
||||
return section;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user