net: simplify sync.Once calls in tests

Change-Id: I0c2e1a4a8261887a696e585dda46e72d691191e0
Reviewed-on: https://go-review.googlesource.com/10070
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/src/net/tcp_test.go b/src/net/tcp_test.go
index 6229df2..6411744 100644
--- a/src/net/tcp_test.go
+++ b/src/net/tcp_test.go
@@ -58,7 +58,7 @@
 }
 
 func benchmarkTCP(b *testing.B, persistent, timeout bool, laddr string) {
-	testHookUninstaller.Do(func() { uninstallTestHooks() })
+	testHookUninstaller.Do(uninstallTestHooks)
 
 	const msgLen = 512
 	conns := b.N
@@ -168,7 +168,7 @@
 }
 
 func benchmarkTCPConcurrentReadWrite(b *testing.B, laddr string) {
-	testHookUninstaller.Do(func() { uninstallTestHooks() })
+	testHookUninstaller.Do(uninstallTestHooks)
 
 	// The benchmark creates GOMAXPROCS client/server pairs.
 	// Each pair creates 4 goroutines: client reader/writer and server reader/writer.