mirror of https://github.com/golang/go.git
os: remove if nil!=nil in openFileNolog
Change-Id: I21cecc13570f3b61f3d6c4fede18dc63ddca1b69
GitHub-Last-Rev: 3c351e4aa8
GitHub-Pull-Request: golang/go#65958
Reviewed-on: https://go-review.googlesource.com/c/go/+/567355
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Quim Muntal <quimmuntal@gmail.com>
This commit is contained in:
parent
6f5d77454e
commit
b414d044ff
|
|
@ -115,11 +115,7 @@ func openFileNolog(name string, flag int, perm FileMode) (*File, error) {
|
|||
}
|
||||
return nil, &PathError{Op: "open", Path: name, Err: e}
|
||||
}
|
||||
f, e := newFile(r, name, "file"), nil
|
||||
if e != nil {
|
||||
return nil, &PathError{Op: "open", Path: name, Err: e}
|
||||
}
|
||||
return f, nil
|
||||
return newFile(r, name, "file"), nil
|
||||
}
|
||||
|
||||
func (file *file) close() error {
|
||||
|
|
|
|||
Loading…
Reference in New Issue