pimd: hash_get w/ hash_alloc_intern cannot fail

The assignment of sa with the usage of hash_get and hash_alloc_intern
can never fail.  No need to look for a failure case.

Found by Coverity SA.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2018-05-30 09:42:24 -04:00
parent a9bafa95d0
commit c37e1f598b

View File

@ -254,11 +254,6 @@ static struct pim_msdp_sa *pim_msdp_sa_new(struct pim_instance *pim,
/* insert into misc tables for easy access */
sa = hash_get(pim->msdp.sa_hash, sa, hash_alloc_intern);
if (!sa) {
zlog_err("%s: PIM hash get failure", __PRETTY_FUNCTION__);
pim_msdp_sa_free(sa);
return NULL;
}
listnode_add_sort(pim->msdp.sa_list, sa);
if (PIM_DEBUG_MSDP_EVENTS) {