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: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Tobias Klauser 2017-10-26 10:10:25 +02:00 committed by Tobias Klauser
parent 7a8e8b2f19
commit dc97f4103c
1 changed files with 2 additions and 4 deletions

View File

@ -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