diff options
author | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2019-10-26 22:19:30 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2019-10-26 22:19:30 +0900 |
commit | ce62ea68d83b7bf224a720d54a8a1dbf1f5d3ca9 (patch) | |
tree | 175590af32f6d32fed88e744ceddbeee2cf4fd21 /internal | |
parent | 2e05695f683430bdf39573b19f51bac4dcbbc693 (diff) |
table: handle staticcheck's warnings
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Diffstat (limited to 'internal')
-rw-r--r-- | internal/pkg/table/message.go | 3 |
1 files changed, 2 insertions, 1 deletions
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 // |