diff options
author | Josh Bleecher Snyder <josh@tailscale.com> | 2021-01-19 08:33:12 -0800 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-01-20 19:57:07 +0100 |
commit | 7c5d1e355e6faa1551296c34aaced4ffe0b16d87 (patch) | |
tree | 89b5b0259ea2e6a31251a1a878c46b1bf30215ee /device | |
parent | a86492a5673983fe7755631996a23c2dc510808f (diff) |
device: remove unnecessary zeroing
Newly allocated objects are already zeroed.
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
Diffstat (limited to 'device')
-rw-r--r-- | device/device.go | 5 |
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 { |