mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-11 16:02:46 +00:00
bfdd: fix coverity warnings
show/clear DEFUNs always require either peer label or IP address to be specified, so if `label` is NULL then `peer_str` is definitely not NULL. But Coverity doesn't know about that, so it complains about possible NULL dereference of `peer_str`. This commit should make Coverity happy. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
This commit is contained in:
parent
b6380d60c7
commit
c3634e4411
@ -579,7 +579,7 @@ _find_peer_or_error(struct vty *vty, int argc, struct cmd_token **argv,
|
|||||||
pl = pl_find(label);
|
pl = pl_find(label);
|
||||||
if (pl)
|
if (pl)
|
||||||
bs = pl->pl_bs;
|
bs = pl->pl_bs;
|
||||||
} else {
|
} else if (peer_str) {
|
||||||
strtosa(peer_str, &psa);
|
strtosa(peer_str, &psa);
|
||||||
if (local_str) {
|
if (local_str) {
|
||||||
strtosa(local_str, &lsa);
|
strtosa(local_str, &lsa);
|
||||||
@ -599,6 +599,9 @@ _find_peer_or_error(struct vty *vty, int argc, struct cmd_token **argv,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bs = bs_peer_find(&bpc);
|
bs = bs_peer_find(&bpc);
|
||||||
|
} else {
|
||||||
|
vty_out(vty, "%% Invalid arguments\n");
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Find peer data. */
|
/* Find peer data. */
|
||||||
|
Loading…
Reference in New Issue
Block a user