extractor: Fix success shadowing

This commit is contained in:
William Woodruff 2020-08-04 09:43:46 -04:00
parent eb5c783f2c
commit 3a0cea8f37
No known key found for this signature in database
GPG Key ID: 70F70A3979DDCED3

View File

@ -257,7 +257,8 @@ func resolveTool(defaultPath string, envPath string, usrPath string) (path strin
func handleExecutable(ea ExtractionArgs) (success bool) {
// get the list of bitcode paths
artifactPaths, success := ea.Extractor(ea.InputFile)
var artifactPaths []string
artifactPaths, success = ea.Extractor(ea.InputFile)
if !success {
return
}
@ -307,7 +308,8 @@ func handleThinArchive(ea ExtractionArgs) (success bool) {
for index, obj := range objectFiles {
LogInfo("obj = '%v'\n", obj)
if len(obj) > 0 {
artifacts, success := ea.Extractor(obj)
var artifacts []string
artifacts, success = ea.Extractor(obj)
if !success {
return
}
@ -462,8 +464,8 @@ func handleArchive(ea ExtractionArgs) (success bool) {
for i := 1; i <= instance; i++ {
if obj != "" && extractFile(ea, inputFile, obj, i) {
artifacts, success := ea.Extractor(obj)
var artifacts []string
artifacts, success = ea.Extractor(obj)
if !success {
return
}