diff options
Diffstat (limited to 'libgo/go/os/sys_bsd.go')
-rw-r--r-- | libgo/go/os/sys_bsd.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libgo/go/os/sys_bsd.go b/libgo/go/os/sys_bsd.go index 67133a1898b..c6a6de5c816 100644 --- a/libgo/go/os/sys_bsd.go +++ b/libgo/go/os/sys_bsd.go @@ -12,10 +12,9 @@ package os import "syscall" func Hostname() (name string, err error) { - var errno int - name, errno = syscall.Sysctl("kern.hostname") - if errno != 0 { - return "", NewSyscallError("sysctl kern.hostname", errno) + name, err = syscall.Sysctl("kern.hostname") + if err != nil { + return "", NewSyscallError("sysctl kern.hostname", err) } return name, nil } |