From 1170039e788db368615451a0a1f5cfccb1d28d41 Mon Sep 17 00:00:00 2001 From: Brian Geffon Date: Wed, 13 Jun 2018 16:20:30 -0700 Subject: Fix missing returns in rpcinet. PiperOrigin-RevId: 200472634 Change-Id: I3f0fb9e3b2f8616e6aa1569188258f330bf1ed31 --- pkg/sentry/socket/rpcinet/socket.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/sentry/socket/rpcinet/socket.go b/pkg/sentry/socket/rpcinet/socket.go index 4ef8b91c3..d8c1f2c1a 100644 --- a/pkg/sentry/socket/rpcinet/socket.go +++ b/pkg/sentry/socket/rpcinet/socket.go @@ -288,7 +288,7 @@ func (s *socketOperations) Bind(t *kernel.Task, sockaddr []byte) *syserr.Error { <-c if e := stack.rpcConn.Request(id).Result.(*pb.SyscallResponse_Bind).Bind.ErrorNumber; e != 0 { - syserr.FromHost(syscall.Errno(e)) + return syserr.FromHost(syscall.Errno(e)) } return nil } @@ -300,7 +300,7 @@ func (s *socketOperations) Listen(t *kernel.Task, backlog int) *syserr.Error { <-c if e := stack.rpcConn.Request(id).Result.(*pb.SyscallResponse_Listen).Listen.ErrorNumber; e != 0 { - syserr.FromHost(syscall.Errno(e)) + return syserr.FromHost(syscall.Errno(e)) } return nil } @@ -361,7 +361,7 @@ func (s *socketOperations) SetSockOpt(t *kernel.Task, level int, name int, opt [ <-c if e := stack.rpcConn.Request(id).Result.(*pb.SyscallResponse_SetSockOpt).SetSockOpt.ErrorNumber; e != 0 { - syserr.FromHost(syscall.Errno(e)) + return syserr.FromHost(syscall.Errno(e)) } return nil } -- cgit v1.2.3