summaryrefslogtreecommitdiffhomepage
path: root/tun
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 /tun
parentd0f8e9477c14a1c92f84beb46cd17b91c56fae44 (diff)
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 'tun')
-rw-r--r--tun/tun_openbsd.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/tun/tun_openbsd.go b/tun/tun_openbsd.go
index 2003420..460daff 100644
--- a/tun/tun_openbsd.go
+++ b/tun/tun_openbsd.go
@@ -124,7 +124,7 @@ func CreateTUN(name string, mtu int) (Device, error) {
if ifIndex != -1 {
tunfile, err = os.OpenFile(fmt.Sprintf("/dev/tun%d", ifIndex), unix.O_RDWR, 0)
} else {
- for ifIndex = 0; ifIndex < 256; ifIndex += 1 {
+ for ifIndex = 0; ifIndex < 256; ifIndex++ {
tunfile, err = os.OpenFile(fmt.Sprintf("/dev/tun%d", ifIndex), unix.O_RDWR, 0)
if err == nil || !errorIsEBUSY(err) {
break