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* 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;
} }