summaryrefslogtreecommitdiff
path: root/zebra/zebra_nhg.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_nhg.c')
-rw-r--r--zebra/zebra_nhg.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c
index c38203df0f..c172f18cf1 100644
--- a/zebra/zebra_nhg.c
+++ b/zebra/zebra_nhg.c
@@ -1526,7 +1526,13 @@ zebra_nhg_rib_find_nhe(struct nhg_hash_entry *rt_nhe, afi_t rt_afi)
{
struct nhg_hash_entry *nhe = NULL;
- if (!(rt_nhe && rt_nhe->nhg.nexthop)) {
+ if (!rt_nhe) {
+ flog_err(EC_ZEBRA_TABLE_LOOKUP_FAILED,
+ "No nhg_hash_entry passed to %s", __func__);
+ return NULL;
+ }
+
+ if (!rt_nhe->nhg.nexthop) {
flog_err(EC_ZEBRA_TABLE_LOOKUP_FAILED,
"No nexthop passed to %s", __func__);
return NULL;