From 92012ee629d2d36f51c3fe646cdf5b94c7823078 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Wed, 20 Apr 2016 18:07:18 +0900 Subject: table: Destination's Calculate doesn't need to return newly added paths Nobody uses them. Signed-off-by: FUJITA Tomonori --- table/destination.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'table/destination.go') diff --git a/table/destination.go b/table/destination.go index 2111f695..131cb129 100644 --- a/table/destination.go +++ b/table/destination.go @@ -226,10 +226,9 @@ func (dd *Destination) validatePath(path *Path) { // // Modifies destination's state related to stored paths. Removes withdrawn // paths from known paths. Also, adds new paths to known paths. -func (dest *Destination) Calculate(ids []string) (map[string]*Path, []*Path, []*Path) { +func (dest *Destination) Calculate(ids []string) (map[string]*Path, []*Path) { best := make(map[string]*Path, len(ids)) oldKnownPathList := dest.knownPathList - updated := dest.newPathList // First remove the withdrawn paths. withdrawnList := dest.explicitWithdraw() // Do implicit withdrawal @@ -266,7 +265,7 @@ func (dest *Destination) Calculate(ids []string) (map[string]*Path, []*Path, []* for _, id := range ids { best[id] = f(id) } - return best, updated, withdrawnList + return best, withdrawnList } // Removes withdrawn paths. -- cgit v1.2.3