Merge pull request #8801 from donaldsharp/SR_coverity

Sr coverity
This commit is contained in:
Donatas Abraitis 2021-06-07 09:52:08 +03:00 committed by GitHub
commit 9babfe2bc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 14 deletions

View File

@ -583,7 +583,7 @@ void ensure_vrf_tovpn_sid(struct bgp *bgp_vpn, struct bgp *bgp_vrf, afi_t afi)
* skip when bgp vpn instance ins't allocated
* or srv6 locator chunk isn't allocated
*/
if (!bgp_vpn || !bgp_vpn->srv6_locator_chunks || !bgp_vrf)
if (!bgp_vpn || !bgp_vpn->srv6_locator_chunks)
return;
tovpn_sid_index = bgp_vrf->vpn_policy[afi].tovpn_sid_index;

View File

@ -975,18 +975,6 @@ const char *format_pcep_message(struct pcep_message *msg)
return PATHD_FORMAT_FINI();
}
const char *format_yang_dnode(struct lyd_node *dnode)
{
char *buff;
int len;
lyd_print_mem(&buff, dnode, LYD_JSON, LYD_PRINT_WD_ALL);
len = strlen(buff);
memcpy(_debug_buff, buff, len);
free(buff);
return _debug_buff;
}
void _format_pcc_opts(int ps, struct pcc_opts *opts)
{
if (opts == NULL) {

View File

@ -51,6 +51,5 @@ const char *format_ctrl_state(struct ctrl_state *state);
const char *format_path(struct path *path);
const char *format_pcep_event(pcep_event *event);
const char *format_pcep_message(struct pcep_message *msg);
const char *format_yang_dnode(struct lyd_node *dnode);
#endif // _PATH_PCEP_DEBUG_H_