aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josh@tailscale.com>2021-01-19 08:33:12 -0800
committerJason A. Donenfeld <Jason@zx2c4.com>2021-01-20 19:57:07 +0100
commit7c5d1e355e6faa1551296c34aaced4ffe0b16d87 (patch)
tree89b5b0259ea2e6a31251a1a878c46b1bf30215ee
parentdevice: remove QueueInboundElement.dropped (diff)
downloadwireguard-go-7c5d1e355e6faa1551296c34aaced4ffe0b16d87.tar.xz
wireguard-go-7c5d1e355e6faa1551296c34aaced4ffe0b16d87.zip
device: remove unnecessary zeroing
Newly allocated objects are already zeroed. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
-rw-r--r--device/device.go5
1 files changed, 0 insertions, 5 deletions
diff --git a/device/device.go b/device/device.go
index d18192e..58e996f 100644
--- a/device/device.go
+++ b/device/device.go
@@ -298,12 +298,7 @@ func (device *Device) SetPrivateKey(sk NoisePrivateKey) error {
func NewDevice(tunDevice tun.Device, logger *Logger) *Device {
device := new(Device)
-
- device.isUp.Set(false)
- device.isClosed.Set(false)
-
device.log = logger
-
device.tun.device = tunDevice
mtu, err := device.tun.device.MTU()
if err != nil {