diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-08-20 20:41:37 -0400 | 
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-08-20 20:41:37 -0400 | 
| commit | 5b3d4186defcf9faa15fce45703ee8c5a80f74db (patch) | |
| tree | 9d5bbdd64223747a6cb6b28ecc9259a605643528 /ospfd/ospf_flood.c | |
| parent | 164ab8625e05ddc4f21d7da9fe1f20f50899e13e (diff) | |
ospfd: Add ospf_lsa_new_and_data function and abstract away
In all but one instance we were following this pattern
with ospf_lsa_new:
ospf_lsa_new()
ospf_lsa_data_new()
so let's create a ospf_lsa_new_and_data to abstract
this bit of fun and cleanup all the places where
it assumes these function calls can fail.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'ospfd/ospf_flood.c')
| -rw-r--r-- | ospfd/ospf_flood.c | 3 | 
1 files changed, 1 insertions, 2 deletions
diff --git a/ospfd/ospf_flood.c b/ospfd/ospf_flood.c index 002c6bba8d..b4e9dda58a 100644 --- a/ospfd/ospf_flood.c +++ b/ospfd/ospf_flood.c @@ -810,8 +810,7 @@ struct ospf_lsa *ospf_ls_request_new(struct lsa_header *lsah)  {  	struct ospf_lsa *new; -	new = ospf_lsa_new(); -	new->data = ospf_lsa_data_new(OSPF_LSA_HEADER_SIZE); +	new = ospf_lsa_new_and_data(OSPF_LSA_HEADER_SIZE);  	memcpy(new->data, lsah, OSPF_LSA_HEADER_SIZE);  	return new;  | 
