diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-10-15 21:09:22 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-10-20 10:33:09 +0900 |
commit | 804126b0ac1c8aae7257d258e2125de16b20b22c (patch) | |
tree | 5ad587911b836c2cc5acd74f6ab38d41db03c69b | |
parent | fc65045b357dc779943969433d429cfa0ae5d6e4 (diff) |
table: remove unnecessary type casting
ASLen() is an interface method
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
-rw-r--r-- | table/path.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/table/path.go b/table/path.go index 812046bc..83e442c0 100644 --- a/table/path.go +++ b/table/path.go @@ -333,9 +333,8 @@ func (path *Path) GetAsPathLen() int { var length int = 0 if _, attr := path.getPathAttr(bgp.BGP_ATTR_TYPE_AS_PATH); attr != nil { aspath := attr.(*bgp.PathAttributeAsPath) - for _, paramIf := range aspath.Value { - segment := paramIf.(*bgp.As4PathParam) - length += segment.ASLen() + for _, as := range aspath.Value { + length += as.ASLen() } } return length |