aboutsummaryrefslogtreecommitdiff
path: root/src/debug
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug')
-rw-r--r--src/debug/macho/fat.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/debug/macho/fat.go b/src/debug/macho/fat.go
index 93b8315263..a34232e022 100644
--- a/src/debug/macho/fat.go
+++ b/src/debug/macho/fat.go
@@ -122,18 +122,18 @@ func NewFatFile(r io.ReaderAt) (*FatFile, error) {
// OpenFat opens the named file using os.Open and prepares it for use as a Mach-O
// universal binary.
-func OpenFat(name string) (ff *FatFile, err error) {
+func OpenFat(name string) (*FatFile, error) {
f, err := os.Open(name)
if err != nil {
return nil, err
}
- ff, err = NewFatFile(f)
+ ff, err := NewFatFile(f)
if err != nil {
f.Close()
return nil, err
}
ff.closer = f
- return
+ return ff, nil
}
func (ff *FatFile) Close() error {