aboutsummaryrefslogtreecommitdiffstats
path: root/tun_darwin.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-05-05 02:48:21 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-05-05 02:48:21 +0200
commit142e53f69827e6778d809d9606bb7cd4e77694a2 (patch)
tree1cc55aef84a6768f427cc393b4387285d58f0402 /tun_darwin.go
parenttun: account for null termination on Linux (diff)
downloadwireguard-go-142e53f69827e6778d809d9606bb7cd4e77694a2.tar.xz
wireguard-go-142e53f69827e6778d809d9606bb7cd4e77694a2.zip
Style
Diffstat (limited to 'tun_darwin.go')
-rw-r--r--tun_darwin.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/tun_darwin.go b/tun_darwin.go
index 5514563..1d66c66 100644
--- a/tun_darwin.go
+++ b/tun_darwin.go
@@ -46,7 +46,7 @@ var sockaddrCtlSize uintptr = 32
func CreateTUN(name string) (TUNDevice, error) {
ifIndex := -1
- if (name != "utun") {
+ if name != "utun" {
fmt.Sscanf(name, "utun%d", &ifIndex)
if ifIndex < 0 {
return nil, fmt.Errorf("Interface name must be utun[0-9]*")