Skip to content

Commit

Permalink
Merge pull request opencontainers#355 from keloyang/nake
Browse files Browse the repository at this point in the history
Remove naked return
  • Loading branch information
LK4D4 committed Oct 26, 2015
2 parents 6c36d66 + 4584a4e commit db21ac7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ func loadSpec(cPath, rPath string) (spec *specs.LinuxSpec, rspec *specs.LinuxRun
if os.IsNotExist(err) {
return nil, nil, fmt.Errorf("JSON specification file at %s not found", cPath)
}
return
return spec, rspec, err
}
defer cf.Close()

Expand All @@ -308,15 +308,15 @@ func loadSpec(cPath, rPath string) (spec *specs.LinuxSpec, rspec *specs.LinuxRun
if os.IsNotExist(err) {
return nil, nil, fmt.Errorf("JSON runtime config file at %s not found", rPath)
}
return
return spec, rspec, err
}
defer rf.Close()

if err = json.NewDecoder(cf).Decode(&spec); err != nil {
return
return spec, rspec, err
}
if err = json.NewDecoder(rf).Decode(&rspec); err != nil {
return
return spec, rspec, err
}
return spec, rspec, checkSpecVersion(spec)
}
Expand Down

0 comments on commit db21ac7

Please sign in to comment.