From a1c36d64503ebd7ba2eff1ad85ed661a1da83b94 Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Fri, 1 Mar 2024 09:30:33 +0100 Subject: [PATCH] Minor cleanup as suggested by @ties --- cmd/stayrtr/stayrtr.go | 2 +- lib/server.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/stayrtr/stayrtr.go b/cmd/stayrtr/stayrtr.go index 73a8bd0..0db6daa 100644 --- a/cmd/stayrtr/stayrtr.go +++ b/cmd/stayrtr/stayrtr.go @@ -445,7 +445,7 @@ func (s *state) applyUpdateFromNewState(vrps []rtr.VRP, brks []rtr.BgpsecKey, va for _, v := range vaps { SDs = append(SDs, v.Copy()) } - if (s.server.AddData(SDs) == false) { + if !s.server.AddData(SDs) { log.Info("No difference to current cache") return nil } diff --git a/lib/server.go b/lib/server.go index 47ceda5..0e3c37a 100644 --- a/lib/server.go +++ b/lib/server.go @@ -373,7 +373,7 @@ func (s *Server) AddData(new []SendableData) bool { curDiff := append(added, removed...) s.sdlock.RUnlock() - if (len(curDiff) == 0) { + if len(curDiff) == 0 { return false } else { s.AddSDsDiff(curDiff)