From b24029717b3a13c38aad8fabcd3951f82cc9564b Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Fri, 10 Apr 2020 07:52:30 -0700 Subject: [PATCH] ipn: outdent some code in if that's statically always true --- ipn/local.go | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/ipn/local.go b/ipn/local.go index 1168505f7..eafc06722 100644 --- a/ipn/local.go +++ b/ipn/local.go @@ -676,22 +676,20 @@ func (b *LocalBackend) authReconfig() { } b.logf("reconfig: ra=%v dns=%v 0x%02x\n", uc.RouteAll, uc.CorpDNS, uflags) - if nm != nil { - dns := nm.DNS - dom := nm.DNSDomains - if !uc.CorpDNS { - dns = []wgcfg.IP{} - dom = []string{} - } - cfg, err := nm.WGCfg(uflags, dns) - if err != nil { - log.Fatalf("WGCfg: %v\n", err) - } + dns := nm.DNS + dom := nm.DNSDomains + if !uc.CorpDNS { + dns = []wgcfg.IP{} + dom = []string{} + } + cfg, err := nm.WGCfg(uflags, dns) + if err != nil { + log.Fatalf("WGCfg: %v\n", err) + } - err = b.e.Reconfig(cfg, dom) - if err != nil { - b.logf("reconfig: %v", err) - } + err = b.e.Reconfig(cfg, dom) + if err != nil { + b.logf("reconfig: %v", err) } }