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/ip_test.go b/src/net/ip_test.go
index 24f67ca..b1939cd 100644
--- a/src/net/ip_test.go
+++ b/src/net/ip_test.go
@@ -53,7 +53,7 @@
 }
 
 func BenchmarkParseIP(b *testing.B) {
-	testHookUninstaller.Do(func() { uninstallTestHooks() })
+	testHookUninstaller.Do(uninstallTestHooks)
 
 	for i := 0; i < b.N; i++ {
 		for _, tt := range parseIPTests {
@@ -110,7 +110,7 @@
 }
 
 func BenchmarkIPString(b *testing.B) {
-	testHookUninstaller.Do(func() { uninstallTestHooks() })
+	testHookUninstaller.Do(uninstallTestHooks)
 
 	for i := 0; i < b.N; i++ {
 		for _, tt := range ipStringTests {
@@ -162,7 +162,7 @@
 }
 
 func BenchmarkIPMaskString(b *testing.B) {
-	testHookUninstaller.Do(func() { uninstallTestHooks() })
+	testHookUninstaller.Do(uninstallTestHooks)
 
 	for i := 0; i < b.N; i++ {
 		for _, tt := range ipMaskStringTests {