diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2021-10-09 20:36:47 -0300 | 
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2021-10-09 20:36:47 -0300 | 
| commit | 44076f4dc784686074adcdeb4f3e7390e1066350 (patch) | |
| tree | 323a03dd44fb183beaf12e0f236a7f202bdb0888 /ospfd/ospf_gr.c | |
| parent | 495047b526207f36c5b4ce359ec14c7b1bb1fa5e (diff) | |
ospfd: use ospf_get_name() wherever possible
Small cleanup to reduce code duplication.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ospfd/ospf_gr.c')
| -rw-r--r-- | ospfd/ospf_gr.c | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/ospfd/ospf_gr.c b/ospfd/ospf_gr.c index c108040303..6a5c0bae98 100644 --- a/ospfd/ospf_gr.c +++ b/ospfd/ospf_gr.c @@ -584,7 +584,7 @@ static void ospf_gr_nvm_update(struct ospf *ospf)  	json_object *json_instance;  	filepath = ospf_gr_nvm_filepath(ospf); -	inst_name = ospf->name ? ospf->name : VRF_DEFAULT_NAME; +	inst_name = ospf_get_name(ospf);  	json = json_object_from_file(filepath);  	if (json == NULL) @@ -630,7 +630,7 @@ static void ospf_gr_nvm_delete(struct ospf *ospf)  	json_object *json_instances;  	filepath = ospf_gr_nvm_filepath(ospf); -	inst_name = ospf->name ? ospf->name : VRF_DEFAULT_NAME; +	inst_name = ospf_get_name(ospf);  	json = json_object_from_file(filepath);  	if (json == NULL) @@ -663,7 +663,7 @@ void ospf_gr_nvm_read(struct ospf *ospf)  	time_t timestamp = 0;  	filepath = ospf_gr_nvm_filepath(ospf); -	inst_name = ospf->name ? ospf->name : VRF_DEFAULT_NAME; +	inst_name = ospf_get_name(ospf);  	json = json_object_from_file(filepath);  	if (json == NULL)  | 
