Code duplication cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39827 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rene Gollent
2010-12-13 16:01:52 +00:00
parent d4556a4f56
commit be443f5333
+3 -5
View File
@@ -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;
}