From 7c5d1e355e6faa1551296c34aaced4ffe0b16d87 Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Tue, 19 Jan 2021 08:33:12 -0800 Subject: [PATCH] device: remove unnecessary zeroing Newly allocated objects are already zeroed. Signed-off-by: Josh Bleecher Snyder --- device/device.go | 5 ----- 1 file changed, 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 {