Skip to content

Commit

Permalink
[Fix #1972] Fix returning of double list size, half nil values
Browse files Browse the repository at this point in the history
  • Loading branch information
thoro authored and fujita committed Feb 14, 2019
1 parent a22897a commit 034b889
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/server/server.go
Expand Up @@ -3125,7 +3125,7 @@ func (s *BgpServer) ListStatement(ctx context.Context, r *api.ListStatementReque
var l []*api.Statement
s.mgmtOperation(func() error {
s := s.policy.GetStatement(r.Name)
l = make([]*api.Statement, len(s))
l = make([]*api.Statement, 0, len(s))
for _, st := range s {
l = append(l, toStatementApi(st))
}
Expand Down

0 comments on commit 034b889

Please sign in to comment.