summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/stack
diff options
context:
space:
mode:
authorKevin Krakauer <krakauer@google.com>2019-03-05 14:52:35 -0800
committerShentubot <shentubot@google.com>2019-03-05 14:53:34 -0800
commit23e66ee96d159a774ecac9f89fab8cff463174a4 (patch)
treebba2633c3fbf9ee15da6655311fe83242b250036 /pkg/tcpip/stack
parentbd46185e24e03b93ac551a5ddfffb06975f157c8 (diff)
Remove unused commit() function argument to Bind.
PiperOrigin-RevId: 236926132 Change-Id: I5cf103f22766e6e65a581de780c7bb9ca0fa3181
Diffstat (limited to 'pkg/tcpip/stack')
-rw-r--r--pkg/tcpip/stack/transport_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/tcpip/stack/transport_test.go b/pkg/tcpip/stack/transport_test.go
index 3347b5599..a9e844e3d 100644
--- a/pkg/tcpip/stack/transport_test.go
+++ b/pkg/tcpip/stack/transport_test.go
@@ -145,7 +145,7 @@ func (f *fakeTransportEndpoint) Accept() (tcpip.Endpoint, *waiter.Queue, *tcpip.
return &a, nil, nil
}
-func (f *fakeTransportEndpoint) Bind(a tcpip.FullAddress, commit func() *tcpip.Error) *tcpip.Error {
+func (f *fakeTransportEndpoint) Bind(a tcpip.FullAddress) *tcpip.Error {
if err := f.stack.RegisterTransportEndpoint(
a.NIC,
[]tcpip.NetworkProtocolNumber{fakeNetNumber},
@@ -157,7 +157,7 @@ func (f *fakeTransportEndpoint) Bind(a tcpip.FullAddress, commit func() *tcpip.E
return err
}
f.acceptQueue = []fakeTransportEndpoint{}
- return commit()
+ return nil
}
func (*fakeTransportEndpoint) GetLocalAddress() (tcpip.FullAddress, *tcpip.Error) {
@@ -483,7 +483,7 @@ func TestTransportForwarding(t *testing.T) {
t.Fatalf("NewEndpoint failed: %v", err)
}
- if err := ep.Bind(tcpip.FullAddress{Addr: "\x01", NIC: 1}, func() *tcpip.Error { return nil }); err != nil {
+ if err := ep.Bind(tcpip.FullAddress{Addr: "\x01", NIC: 1}); err != nil {
t.Fatalf("Bind failed: %v", err)
}