summaryrefslogtreecommitdiff
path: root/pimd/pim_upstream.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2022-08-15 11:40:13 -0400
committerDonald Sharp <sharpd@nvidia.com>2022-08-15 15:45:05 -0400
commite89de028950e9f6f4bd98a019e6bfa6dfd7b37c3 (patch)
tree3f1229f48946a62feb119c79a741b7a806b95a49 /pimd/pim_upstream.c
parent29b458ef1f72c9b117cb603dd74ab3aec49e21ae (diff)
pimd: pim_upstream_add up must exist
When calling pim_upstream_add, the lookup for upstream or the creation of the upstream cannot fail. As such up is never NULL. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'pimd/pim_upstream.c')
-rw-r--r--pimd/pim_upstream.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c
index 25e7e52705..0742daa4de 100644
--- a/pimd/pim_upstream.c
+++ b/pimd/pim_upstream.c
@@ -1061,15 +1061,13 @@ struct pim_upstream *pim_upstream_add(struct pim_instance *pim, pim_sgaddr *sg,
}
if (PIM_DEBUG_PIM_TRACE) {
- if (up)
- zlog_debug("%s(%s): %s, iif %pPA (%s) found: %d: ref_count: %d",
- __func__, name,
- up->sg_str, &up->rpf.rpf_addr, up->rpf.source_nexthop.interface ?
- up->rpf.source_nexthop.interface->name : "Unknown" ,
- found, up->ref_count);
- else
- zlog_debug("%s(%s): (%pSG) failure to create", __func__,
- name, sg);
+ zlog_debug(
+ "%s(%s): %s, iif %pPA (%s) found: %d: ref_count: %d",
+ __func__, name, up->sg_str, &up->rpf.rpf_addr,
+ up->rpf.source_nexthop.interface ? up->rpf.source_nexthop
+ .interface->name
+ : "Unknown",
+ found, up->ref_count);
}
return up;