From 010a459365c97e94db822c3052f7610e16356f4d Mon Sep 17 00:00:00 2001 From: Preetha Appan Date: Tue, 27 Mar 2018 10:59:42 -0500 Subject: [PATCH] Remove unnecessary nil checks --- agent/consul/server.go | 3 --- agent/router/router.go | 3 --- 2 files changed, 6 deletions(-) diff --git a/agent/consul/server.go b/agent/consul/server.go index fa633a4efe..764563d2f9 100644 --- a/agent/consul/server.go +++ b/agent/consul/server.go @@ -888,9 +888,6 @@ func (s *Server) KeyManagerLAN() *serf.KeyManager { // KeyManagerWAN returns the WAN Serf keyring manager func (s *Server) KeyManagerWAN() *serf.KeyManager { - if s.serfWAN == nil { - return nil - } return s.serfWAN.KeyManager() } diff --git a/agent/router/router.go b/agent/router/router.go index f811a6c331..426ca16283 100644 --- a/agent/router/router.go +++ b/agent/router/router.go @@ -116,9 +116,6 @@ func (r *Router) Shutdown() { // AddArea registers a new network area with the router. func (r *Router) AddArea(areaID types.AreaID, cluster RouterSerfCluster, pinger Pinger, useTLS bool) error { - if cluster == nil { - return nil - } r.Lock() defer r.Unlock()