From ce62ea68d83b7bf224a720d54a8a1dbf1f5d3ca9 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Sat, 26 Oct 2019 22:19:30 +0900 Subject: table: handle staticcheck's warnings Signed-off-by: FUJITA Tomonori --- internal/pkg/table/message.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'internal') diff --git a/internal/pkg/table/message.go b/internal/pkg/table/message.go index 32069484..014e8978 100644 --- a/internal/pkg/table/message.go +++ b/internal/pkg/table/message.go @@ -130,8 +130,9 @@ func UpdatePathAttrs4ByteAs(msg *bgp.BGPUpdate) error { } as4Len := 0 - as4Params := make([]bgp.AsPathParamInterface, 0, len(as4Attr.Value)) + var as4Params []bgp.AsPathParamInterface if as4Attr != nil { + as4Params = make([]bgp.AsPathParamInterface, 0, len(as4Attr.Value)) for _, p := range as4Attr.Value { // RFC 6793 6. Error Handling // -- cgit v1.2.3