summaryrefslogtreecommitdiff
path: root/device/pools.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/pools.go
parentd0f8e9477c14a1c92f84beb46cd17b91c56fae44 (diff)
downloadwireguard-go-1481e72107db7b42db88047ad1faf7cb6924fb78.tar.gz
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/pools.go')
-rw-r--r--device/pools.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/device/pools.go b/device/pools.go
index 55eb6ab..12da65b 100644
--- a/device/pools.go
+++ b/device/pools.go
@@ -26,15 +26,15 @@ func (device *Device) PopulatePools() {
}
} else {
device.pool.messageBufferReuseChan = make(chan *[MaxMessageSize]byte, PreallocatedBuffersPerPool)
- for i := 0; i < PreallocatedBuffersPerPool; i += 1 {
+ for i := 0; i < PreallocatedBuffersPerPool; i++ {
device.pool.messageBufferReuseChan <- new([MaxMessageSize]byte)
}
device.pool.inboundElementReuseChan = make(chan *QueueInboundElement, PreallocatedBuffersPerPool)
- for i := 0; i < PreallocatedBuffersPerPool; i += 1 {
+ for i := 0; i < PreallocatedBuffersPerPool; i++ {
device.pool.inboundElementReuseChan <- new(QueueInboundElement)
}
device.pool.outboundElementReuseChan = make(chan *QueueOutboundElement, PreallocatedBuffersPerPool)
- for i := 0; i < PreallocatedBuffersPerPool; i += 1 {
+ for i := 0; i < PreallocatedBuffersPerPool; i++ {
device.pool.outboundElementReuseChan <- new(QueueOutboundElement)
}
}