Eliminate empty route items
Signed-off-by: zhengdelun <xszhengdelun@gmail.com>
This commit is contained in:
parent
e67f06a4ab
commit
771559372e
2 changed files with 5 additions and 5 deletions
|
@ -191,7 +191,7 @@ func (c *ip4Config) GetPropertyRouteData() ([]IP4RouteData, error) {
|
|||
return routes, err
|
||||
}
|
||||
|
||||
for _, routeData := range routesData {
|
||||
for index, routeData := range routesData {
|
||||
|
||||
route := IP4RouteData{}
|
||||
|
||||
|
@ -229,7 +229,7 @@ func (c *ip4Config) GetPropertyRouteData() ([]IP4RouteData, error) {
|
|||
}
|
||||
}
|
||||
|
||||
routes = append(routes, route)
|
||||
routes[index] = route
|
||||
}
|
||||
return routes, nil
|
||||
}
|
||||
|
|
|
@ -129,7 +129,7 @@ func (c *ip6Config) GetPropertyRouteData() ([]IP6RouteData, error) {
|
|||
return routes, err
|
||||
}
|
||||
|
||||
for _, routeData := range routesData {
|
||||
for index, routeData := range routesData {
|
||||
|
||||
route := IP6RouteData{}
|
||||
|
||||
|
@ -166,8 +166,8 @@ func (c *ip6Config) GetPropertyRouteData() ([]IP6RouteData, error) {
|
|||
route.AdditionalAttributes[routeDataAttributeName] = routeDataAttribute.String()
|
||||
}
|
||||
}
|
||||
|
||||
routes = append(routes, route)
|
||||
|
||||
routes[index] = route
|
||||
}
|
||||
return routes, nil
|
||||
}
|
||||
|
|
Reference in a new issue