From eaf17becfa70c31bcfb6f195e8d68cb5b720ec4a Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 6 Jun 2019 23:00:15 +0200 Subject: [PATCH] global: fixup TODO comment spacing --- ipc/uapi_windows.go | 2 +- tun/tun_darwin.go | 2 +- tun/tun_freebsd.go | 4 ++-- tun/tun_linux.go | 2 +- tun/tun_openbsd.go | 2 +- tun/tun_windows.go | 2 +- tun/wintun/wintun_windows.go | 8 ++++---- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ipc/uapi_windows.go b/ipc/uapi_windows.go index 981c7b9..32d5524 100644 --- a/ipc/uapi_windows.go +++ b/ipc/uapi_windows.go @@ -11,7 +11,7 @@ import ( "golang.zx2c4.com/wireguard/ipc/winpipe" ) -//TODO: replace these with actual standard windows error numbers from the win package +// TODO: replace these with actual standard windows error numbers from the win package const ( IpcErrorIO = -int64(5) IpcErrorProtocol = -int64(71) diff --git a/tun/tun_darwin.go b/tun/tun_darwin.go index f7cf8e8..8cd22a8 100644 --- a/tun/tun_darwin.go +++ b/tun/tun_darwin.go @@ -286,7 +286,7 @@ func (tun *NativeTun) Write(buff []byte, offset int) (int, error) { } func (tun *NativeTun) Flush() error { - //TODO: can flushing be implemented by buffering and using sendmmsg? + // TODO: can flushing be implemented by buffering and using sendmmsg? return nil } diff --git a/tun/tun_freebsd.go b/tun/tun_freebsd.go index b7c82cf..df43ab7 100644 --- a/tun/tun_freebsd.go +++ b/tun/tun_freebsd.go @@ -26,7 +26,7 @@ const ( _TUNSIFPID = 0x2000745f ) -//TODO: move into x/sys/unix +// TODO: move into x/sys/unix const ( SIOCGIFINFO_IN6 = 0xc048696c SIOCSIFINFO_IN6 = 0xc048696d @@ -467,7 +467,7 @@ func (tun *NativeTun) Write(buff []byte, offset int) (int, error) { } func (tun *NativeTun) Flush() error { - //TODO: can flushing be implemented by buffering and using sendmmsg? + // TODO: can flushing be implemented by buffering and using sendmmsg? return nil } diff --git a/tun/tun_linux.go b/tun/tun_linux.go index f5f7ec7..2168f5b 100644 --- a/tun/tun_linux.go +++ b/tun/tun_linux.go @@ -320,7 +320,7 @@ func (tun *NativeTun) Write(buff []byte, offset int) (int, error) { } func (tun *NativeTun) Flush() error { - //TODO: can flushing be implemented by buffering and using sendmmsg? + // TODO: can flushing be implemented by buffering and using sendmmsg? return nil } diff --git a/tun/tun_openbsd.go b/tun/tun_openbsd.go index a3db83b..b0f5ca4 100644 --- a/tun/tun_openbsd.go +++ b/tun/tun_openbsd.go @@ -239,7 +239,7 @@ func (tun *NativeTun) Write(buff []byte, offset int) (int, error) { } func (tun *NativeTun) Flush() error { - //TODO: can flushing be implemented by buffering and using sendmmsg? + // TODO: can flushing be implemented by buffering and using sendmmsg? return nil } diff --git a/tun/tun_windows.go b/tun/tun_windows.go index 7051d61..0b41be9 100644 --- a/tun/tun_windows.go +++ b/tun/tun_windows.go @@ -218,7 +218,7 @@ func (tun *NativeTun) MTU() (int, error) { return tun.forcedMTU, nil } -//TODO: This is a temporary hack. We really need to be monitoring the interface in real time and adapting to MTU changes. +// TODO: This is a temporary hack. We really need to be monitoring the interface in real time and adapting to MTU changes. func (tun *NativeTun) ForceMTU(mtu int) { tun.forcedMTU = mtu } diff --git a/tun/wintun/wintun_windows.go b/tun/wintun/wintun_windows.go index ac811af..ec7f8ea 100644 --- a/tun/wintun/wintun_windows.go +++ b/tun/wintun/wintun_windows.go @@ -122,7 +122,7 @@ func GetInterface(ifname string, hwndParent uintptr) (*Wintun, error) { continue } - //TODO: is there a better way than comparing ifnames? + // TODO: is there a better way than comparing ifnames? // Get interface name. ifname2, err := wintun.InterfaceName() if err != nil { @@ -225,7 +225,7 @@ func CreateInterface(description string, hwndParent uintptr) (*Wintun, bool, err // Search for the driver. const driverType = setupapi.SPDIT_COMPATDRIVER - err = devInfoList.BuildDriverInfoList(deviceData, driverType) //TODO: This takes ~510ms + err = devInfoList.BuildDriverInfoList(deviceData, driverType) // TODO: This takes ~510ms if err != nil { return nil, false, fmt.Errorf("SetupDiBuildDriverInfoList failed: %v", err) } @@ -233,7 +233,7 @@ func CreateInterface(description string, hwndParent uintptr) (*Wintun, bool, err driverDate := windows.Filetime{} driverVersion := uint64(0) - for index := 0; ; index++ { //TODO: This loop takes ~600ms + for index := 0; ; index++ { // TODO: This loop takes ~600ms // Get a driver from the list. driverData, err := devInfoList.EnumDriverInfo(deviceData, driverType, index) if err != nil { @@ -572,7 +572,7 @@ func (wintun *Wintun) deviceData(hwndParent uintptr) (setupapi.DevInfo, *setupap } // Get interface ID. - //TODO: Store some ID in the Wintun object such that this call isn't required. + // TODO: Store some ID in the Wintun object such that this call isn't required. wintun2, err := makeWintun(devInfoList, deviceData) if err != nil { continue