diff options
author | Donald Sharp <sharpd@nvidia.com> | 2023-03-30 21:48:53 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2023-04-07 00:00:09 +0200 |
commit | b589466918337c11021fd4085aacf0d7e963a9a4 (patch) | |
tree | 9a56c43152d2733b5a1674152ac8d2c70e6dc891 /pathd | |
parent | Merge pull request #13214 from chiragshah6/fdev2 (diff) | |
download | frr-b589466918337c11021fd4085aacf0d7e963a9a4.tar.xz frr-b589466918337c11021fd4085aacf0d7e963a9a4.zip |
*: Use a `struct prefix *p` instead of a `struct prefix` in functions
When passing a prefix into a function let's pass by address instead
of pass by value. Let's save our stack space.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'pathd')
-rw-r--r-- | pathd/path_ted.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pathd/path_ted.c b/pathd/path_ted.c index d8ddd8cdc..fd5c342d8 100644 --- a/pathd/path_ted.c +++ b/pathd/path_ted.c @@ -268,7 +268,7 @@ uint32_t path_ted_query_type_c(struct prefix *prefix, uint8_t algo) switch (prefix->family) { case AF_INET: case AF_INET6: - subnet = ls_find_subnet(ted_state_g.ted, *prefix); + subnet = ls_find_subnet(ted_state_g.ted, prefix); if (subnet) { if ((CHECK_FLAG(subnet->ls_pref->flags, LS_PREF_SR)) && (subnet->ls_pref->sr.algo == algo)) @@ -298,7 +298,7 @@ uint32_t path_ted_query_type_e(struct prefix *prefix, uint32_t iface_id) switch (prefix->family) { case AF_INET: case AF_INET6: - subnet = ls_find_subnet(ted_state_g.ted, *prefix); + subnet = ls_find_subnet(ted_state_g.ted, prefix); if (subnet && subnet->vertex && subnet->vertex->outgoing_edges) { /* from the vertex linked in subnet */ |