summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/stack/transport_demuxer.go
diff options
context:
space:
mode:
authorIan Gudger <igudger@google.com>2018-05-08 09:51:07 -0700
committerShentubot <shentubot@google.com>2018-05-08 09:51:56 -0700
commitb4765f782d91443ab0415dc00e727d783632e2ad (patch)
tree82c2b45b7d9fee5ceaf3792e34c5fdf09c69da43 /pkg/tcpip/stack/transport_demuxer.go
parentd0d01a18963ed7cfc29e5b8334e30b1234b6048b (diff)
Fix warning: redundant if ...; err != nil check, just return error instead.
This warning is produced by golint. PiperOrigin-RevId: 195833381 Change-Id: Idd6a7e57e3cfdf00819f2374b19fc113585dc1e1
Diffstat (limited to 'pkg/tcpip/stack/transport_demuxer.go')
-rw-r--r--pkg/tcpip/stack/transport_demuxer.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/pkg/tcpip/stack/transport_demuxer.go b/pkg/tcpip/stack/transport_demuxer.go
index 3c0d7aa31..7bb853622 100644
--- a/pkg/tcpip/stack/transport_demuxer.go
+++ b/pkg/tcpip/stack/transport_demuxer.go
@@ -158,9 +158,5 @@ func (d *transportDemuxer) findEndpointLocked(eps *transportEndpoints, vv *buffe
// Try to find a match with only the local port.
nid.LocalAddress = ""
- if ep := eps.endpoints[nid]; ep != nil {
- return ep
- }
-
- return nil
+ return eps.endpoints[nid]
}