summaryrefslogtreecommitdiffstats
path: root/src/vnet/fib/fib_path.c
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2018-07-30 08:04:40 -0700
committerNeale Ranns <neale.ranns@cisco.com>2018-07-30 08:04:40 -0700
commitc5d4317ad0425d01893dbb4afad9f16c2cde077d (patch)
tree2bbb6b86a5bf9f051cacc5065a6b6c58be7cbcb6 /src/vnet/fib/fib_path.c
parent1f895c9a40f446ca9f1b7803f350c70ebb3ad0fa (diff)
FIB: return entry prefix by const reference to avoid the copy
Change-Id: I09b8406168df4b6b28df3ede24ee839681be0195 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Diffstat (limited to 'src/vnet/fib/fib_path.c')
-rw-r--r--src/vnet/fib/fib_path.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/vnet/fib/fib_path.c b/src/vnet/fib/fib_path.c
index 2912c6a76b7..47142284202 100644
--- a/src/vnet/fib/fib_path.c
+++ b/src/vnet/fib/fib_path.c
@@ -874,13 +874,10 @@ fib_path_unresolve (fib_path_t *path)
case FIB_PATH_TYPE_RECURSIVE:
if (FIB_NODE_INDEX_INVALID != path->fp_via_fib)
{
- fib_prefix_t pfx;
-
- fib_entry_get_prefix(path->fp_via_fib, &pfx);
fib_entry_child_remove(path->fp_via_fib,
path->fp_sibling);
fib_table_entry_special_remove(path->recursive.fp_tbl_id,
- &pfx,
+ fib_entry_get_prefix(path->fp_via_fib),
FIB_SOURCE_RR);
path->fp_via_fib = FIB_NODE_INDEX_INVALID;
}