Commit dc97f410 authored by Tobias Klauser's avatar Tobias Klauser Committed by Tobias Klauser

syscall: simplify return in Futimesat and Mount

Directly return error instead of assigning to err and then returning.

Change-Id: Ie5c466cac70cc6d52ee72ebba3e497e0da8a5797
Reviewed-on: https://go-review.googlesource.com/73531
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent 7a8e8b2f
......@@ -126,8 +126,7 @@ func Futimesat(dirfd int, path string, tv []Timeval) (err error) {
if err != nil {
return err
}
err = futimesat(dirfd, pathp, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
return err
return futimesat(dirfd, pathp, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
}
func Futimes(fd int, tv []Timeval) (err error) {
......@@ -801,8 +800,7 @@ func Mount(source string, target string, fstype string, flags uintptr, data stri
if err != nil {
return err
}
err = mount(source, target, fstype, flags, datap)
return err
return mount(source, target, fstype, flags, datap)
}
// Sendto
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment