summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2019-02-07 20:49:41 +0100
committerSimon Rozman <simon@rozman.si>2019-02-07 20:49:41 +0100
commit043b7e8013674d58757fe3d3f4e4cacf89c46112 (patch)
tree4ce788a8b8e8167cfaeeade19eb841b5790d1026
parentef48d4fa957f0ae7db3e9ad51c0d443ccc410588 (diff)
wintun: Clean excessive setupapi.DevInfo.GetDeviceInfoListDetail() call
Signed-off-by: Simon Rozman <simon@rozman.si>
-rw-r--r--tun/wintun/wintun_windows.go14
1 files changed, 0 insertions, 14 deletions
diff --git a/tun/wintun/wintun_windows.go b/tun/wintun/wintun_windows.go
index c1ffb17..75180d5 100644
--- a/tun/wintun/wintun_windows.go
+++ b/tun/wintun/wintun_windows.go
@@ -45,13 +45,6 @@ func GetInterface(ifname string, hwndParent uintptr) (*Wintun, error) {
}
defer devInfoList.Close()
- // Retrieve information associated with a device information set.
- // TODO: Is this really necessary?
- _, err = devInfoList.GetDeviceInfoListDetail()
- if err != nil {
- return nil, err
- }
-
// Windows requires each interface to have a different name. When
// enforcing this, Windows treats interface names case-insensitive. If an
// interface "FooBar" exists and this function reports there is no
@@ -266,13 +259,6 @@ func (wintun *Wintun) DeleteInterface(hwndParent uintptr) (bool, bool, error) {
}
defer devInfoList.Close()
- // Retrieve information associated with a device information set.
- // TODO: Is this really necessary?
- _, err = devInfoList.GetDeviceInfoListDetail()
- if err != nil {
- return false, false, err
- }
-
// Iterate.
for index := 0; ; index++ {
// Get the device from the list.