diff options
| author | Sai Gomathi N <nsaigomathi@vmware.com> | 2022-10-27 01:52:31 -0700 |
|---|---|---|
| committer | Sai Gomathi N <nsaigomathi@vmware.com> | 2022-10-27 03:57:55 -0700 |
| commit | f13530f23a9ba73027f8f40b78eb81396afaa092 (patch) | |
| tree | dbc488284721a422e243b732153eac70509c4aeb | |
| parent | d5850a1b6ad699d60ecf9b1dbe52196c7ae685d3 (diff) | |
pimd: Unchecked return value
In tib_sg_oil_setup: Value returned from a function is not checked for errors before being used.
If the function returns an error value, the error value may be mistaken for a normal value.
Here, only the nexthop value is being used. So casted the return type to void.
Coverity CID-1519816
Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
| -rw-r--r-- | pimd/pim_tib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pimd/pim_tib.c b/pimd/pim_tib.c index 8f5de3e938..3455e30064 100644 --- a/pimd/pim_tib.c +++ b/pimd/pim_tib.c @@ -49,7 +49,8 @@ tib_sg_oil_setup(struct pim_instance *pim, pim_sgaddr sg, struct interface *oif) if (up) { memcpy(&nexthop, &up->rpf.source_nexthop, sizeof(struct pim_nexthop)); - pim_ecmp_nexthop_lookup(pim, &nexthop, vif_source, &grp, 0); + (void)pim_ecmp_nexthop_lookup(pim, &nexthop, vif_source, &grp, + 0); if (nexthop.interface) input_iface_vif_index = pim_if_find_vifindex_by_ifindex( pim, nexthop.interface->ifindex); |
