summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/socket/epsocket/epsocket.go
diff options
context:
space:
mode:
authorIan Gudger <igudger@google.com>2018-08-14 19:02:36 -0700
committerShentubot <shentubot@google.com>2018-08-14 19:03:38 -0700
commita620bea045b018b717fbba3193975e6d97c09bf9 (patch)
treee627299e37b463a00f1eb548725d12ac4662fbad /pkg/sentry/socket/epsocket/epsocket.go
parente8a4f2e133c3a7fb4a2dceb6675ebc57ea4f7350 (diff)
Reduce map lookups in syserr
PiperOrigin-RevId: 208755352 Change-Id: Ia24630f452a4a42940ab73a8113a2fd5ea2cfca2
Diffstat (limited to 'pkg/sentry/socket/epsocket/epsocket.go')
-rw-r--r--pkg/sentry/socket/epsocket/epsocket.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/sentry/socket/epsocket/epsocket.go b/pkg/sentry/socket/epsocket/epsocket.go
index 0000875e7..f8b24aaf1 100644
--- a/pkg/sentry/socket/epsocket/epsocket.go
+++ b/pkg/sentry/socket/epsocket/epsocket.go
@@ -473,7 +473,7 @@ func GetSockOpt(t *kernel.Task, s socket.Socket, ep commonEndpoint, family int,
if err == nil {
return int32(0), nil
}
- return int32(syserr.ToLinux(syserr.TranslateNetstackError(err)).Number()), nil
+ return int32(syserr.TranslateNetstackError(err).ToLinux().Number()), nil
case linux.SO_PEERCRED:
if family != linux.AF_UNIX || outLen < syscall.SizeofUcred {