summaryrefslogtreecommitdiffstats
path: root/lib/link_state.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-03-30 21:48:53 +0200
committerDonald Sharp <sharpd@nvidia.com>2023-04-07 00:00:09 +0200
commitb589466918337c11021fd4085aacf0d7e963a9a4 (patch)
tree9a56c43152d2733b5a1674152ac8d2c70e6dc891 /lib/link_state.h
parentMerge pull request #13214 from chiragshah6/fdev2 (diff)
downloadfrr-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 'lib/link_state.h')
-rw-r--r--lib/link_state.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/link_state.h b/lib/link_state.h
index e6a6388ba..b75f03543 100644
--- a/lib/link_state.h
+++ b/lib/link_state.h
@@ -314,7 +314,7 @@ extern int ls_attributes_same(struct ls_attributes *a1,
*
* @return New Link State Prefix
*/
-extern struct ls_prefix *ls_prefix_new(struct ls_node_id adv, struct prefix p);
+extern struct ls_prefix *ls_prefix_new(struct ls_node_id adv, struct prefix *p);
/**
* Remove Link State Prefix. Data Structure is freed.
@@ -709,7 +709,7 @@ extern void ls_subnet_del_all(struct ls_ted *ted, struct ls_subnet *subnet);
* @return Subnet if found, NULL otherwise
*/
extern struct ls_subnet *ls_find_subnet(struct ls_ted *ted,
- const struct prefix prefix);
+ const struct prefix *prefix);
/**
* Create a new Link State Data Base.