summaryrefslogtreecommitdiffhomepage
path: root/pkg
diff options
context:
space:
mode:
authorThomas Rosenstein <thomas.rosenstein@creamfinance.com>2019-02-12 16:58:38 +0100
committerFUJITA Tomonori <fujita.tomonori@gmail.com>2019-02-15 07:06:31 +0900
commit034b889e4d08409d211fb843cf08a8d07faca4f7 (patch)
tree314ce1f2aafaab610f7d00cccd0a8ec97cfbf63c /pkg
parenta22897a0afcff265099c69607212cff8edf13332 (diff)
[Fix #1972] Fix returning of double list size, half nil values
Diffstat (limited to 'pkg')
-rw-r--r--pkg/server/server.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/server/server.go b/pkg/server/server.go
index cd78f3fb..8b53a7a8 100644
--- a/pkg/server/server.go
+++ b/pkg/server/server.go
@@ -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))
}