summaryrefslogtreecommitdiffstats
path: root/src/plugins/map/map.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/plugins/map/map.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/plugins/map/map.c')
-rw-r--r--src/plugins/map/map.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/map/map.c b/src/plugins/map/map.c
index 6d9730f3b06..63d6e1a3965 100644
--- a/src/plugins/map/map.c
+++ b/src/plugins/map/map.c
@@ -363,12 +363,12 @@ format_map_pre_resolve (u8 * s, va_list * ap)
if (FIB_NODE_INDEX_INVALID != pr->fei)
{
- fib_prefix_t pfx;
+ const fib_prefix_t *pfx;
- fib_entry_get_prefix (pr->fei, &pfx);
+ pfx = fib_entry_get_prefix (pr->fei);
return (format (s, "%U (%u)",
- format_ip46_address, &pfx.fp_addr, IP46_TYPE_ANY,
+ format_ip46_address, &pfx->fp_addr, IP46_TYPE_ANY,
pr->dpo.dpoi_index));
}
else