aboutsummaryrefslogtreecommitdiffstats
path: root/device/allowedips_test.go
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josh@tailscale.com>2020-12-22 11:38:24 -0800
committerJason A. Donenfeld <Jason@zx2c4.com>2021-01-07 14:49:44 +0100
commit1481e72107db7b42db88047ad1faf7cb6924fb78 (patch)
treecee7d0df35c37e9b03bae2d5330d0a2949f209af /device/allowedips_test.go
parentdevice: remove unnecessary zeroing (diff)
downloadwireguard-go-1481e72107db7b42db88047ad1faf7cb6924fb78.tar.xz
wireguard-go-1481e72107db7b42db88047ad1faf7cb6924fb78.zip
all: use ++ to increment
Make the code slightly more idiomatic. No functional changes. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
Diffstat (limited to 'device/allowedips_test.go')
-rw-r--r--device/allowedips_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/device/allowedips_test.go b/device/allowedips_test.go
index 005df48..27028a6 100644
--- a/device/allowedips_test.go
+++ b/device/allowedips_test.go
@@ -70,11 +70,11 @@ func benchmarkTrie(peerNumber int, addressNumber int, addressLength int, b *test
const AddressLength = 4
- for n := 0; n < peerNumber; n += 1 {
+ for n := 0; n < peerNumber; n++ {
peers = append(peers, &Peer{})
}
- for n := 0; n < addressNumber; n += 1 {
+ for n := 0; n < addressNumber; n++ {
var addr [AddressLength]byte
rand.Read(addr[:])
cidr := uint(rand.Uint32() % (AddressLength * 8))
@@ -82,7 +82,7 @@ func benchmarkTrie(peerNumber int, addressNumber int, addressLength int, b *test
trie = trie.insert(addr[:], cidr, peers[index])
}
- for n := 0; n < b.N; n += 1 {
+ for n := 0; n < b.N; n++ {
var addr [AddressLength]byte
rand.Read(addr[:])
trie.lookup(addr[:])