Skip to content

Commit

Permalink
avoid unnecessary allocation
Browse files Browse the repository at this point in the history
Co-authored-by: Viktor Liu <17948409+lixmal@users.noreply.github.com>
  • Loading branch information
mlsmaycon and lixmal authored Nov 29, 2024
1 parent 78bd1dd commit 6b3ce3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion management/server/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ func (a *Account) getPeerRoutesFirewallRules(ctx context.Context, peerID string,
}

func (a *Account) getRouteFirewallRules(ctx context.Context, peerID string, policies []*Policy, route *route.Route, validatedPeersMap map[string]struct{}, distributionPeers map[string]struct{}) []*RouteFirewallRule {
fwRules := make([]*RouteFirewallRule, 0)
var fwRules []*RouteFirewallRule
for _, policy := range policies {
if !policy.Enabled {
continue
Expand Down

0 comments on commit 6b3ce3c

Please sign in to comment.