summaryrefslogtreecommitdiffhomepage
path: root/tun/tun_windows.go
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2019-06-03 14:16:34 +0200
committerSimon Rozman <simon@rozman.si>2019-06-06 08:58:26 +0200
commitc2ed133df80392a1592a6b0b79228041dd725427 (patch)
treef839e2e131b6c345b4dadfd18682f8e4b9e9aa3c /tun/tun_windows.go
parent108c37a05639a5fdbef2112a046ed7d7b1f2c27a (diff)
wintun: simplify DeleteInterface method signature
Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'tun/tun_windows.go')
-rw-r--r--tun/tun_windows.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/tun/tun_windows.go b/tun/tun_windows.go
index 8c384f6..7051d61 100644
--- a/tun/tun_windows.go
+++ b/tun/tun_windows.go
@@ -67,7 +67,7 @@ func CreateTUN(ifname string) (TUNDevice, error) {
wt, err = wintun.GetInterface(ifname, 0)
if err == nil {
// If so, we delete it, in case it has weird residual configuration.
- _, _, err = wt.DeleteInterface(0)
+ _, err = wt.DeleteInterface(0)
if err != nil {
return nil, fmt.Errorf("Unable to delete already existing Wintun interface: %v", err)
}
@@ -206,7 +206,7 @@ func (tun *NativeTun) Close() error {
close(tun.events)
}
- _, _, err2 := tun.wt.DeleteInterface(0)
+ _, err2 := tun.wt.DeleteInterface(0)
if err1 == nil {
err1 = err2
}