From 1481e72107db7b42db88047ad1faf7cb6924fb78 Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Tue, 22 Dec 2020 11:38:24 -0800 Subject: all: use ++ to increment Make the code slightly more idiomatic. No functional changes. Signed-off-by: Josh Bleecher Snyder --- tun/tun_openbsd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tun') 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 -- cgit v1.2.3