From f0100df2ace80b3b8e90e3ff1c0da22786c0d099 Mon Sep 17 00:00:00 2001 From: ac2pic Date: Sat, 25 Jun 2022 19:46:03 -0500 Subject: [PATCH] Add minor refactor --- pkg/oelf/OELFGenDynlibData.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pkg/oelf/OELFGenDynlibData.go b/pkg/oelf/OELFGenDynlibData.go index 7ad3987..c4e8aea 100644 --- a/pkg/oelf/OELFGenDynlibData.go +++ b/pkg/oelf/OELFGenDynlibData.go @@ -535,11 +535,8 @@ func writeNIDTable(orbisElf *OrbisElf, segmentData *[]byte) (uint64, error) { for idx, library := range libraries { libName := library.(string) - libSyms := orbisElf.LibrarySymbolDictionary.Get(libName) - if libSyms == nil { - continue - } - if contains(libSyms.([]string), symbol.Name) { + libSyms := orbisElf.LibrarySymbolDictionary.Get(libName).([]string) + if contains(libSyms, symbol.Name) { libraryName = libName symbolLibraryIndex = idx break