diff options
| author | Stephen Worley <sworley@cumulusnetworks.com> | 2019-09-03 14:46:14 -0400 |
|---|---|---|
| committer | Stephen Worley <sworley@cumulusnetworks.com> | 2019-10-25 11:13:43 -0400 |
| commit | 9c387098eb147a628857982639258cf7d4d9a090 (patch) | |
| tree | 95665b994559888fe01fe45e05bd3a9f877ab6ff /lib/nexthop_group.c | |
| parent | 737170f5bf7e9f999543c30eff4824646885652b (diff) | |
lib: Fix nexthop_group_equal*() NULL check
Logic error on the second null check for nexthop groups
passed to the `nexthop_group_equal*() functions. This fixes it.
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'lib/nexthop_group.c')
| -rw-r--r-- | lib/nexthop_group.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/nexthop_group.c b/lib/nexthop_group.c index 86c885012c..54868d7fca 100644 --- a/lib/nexthop_group.c +++ b/lib/nexthop_group.c @@ -142,7 +142,7 @@ bool nexthop_group_equal_no_recurse(const struct nexthop_group *nhg1, if (nhg1 && !nhg2) return false; - if (!nhg1 && !nhg2) + if (!nhg1 && nhg2) return false; if (nexthop_group_nexthop_num_no_recurse(nhg1) @@ -168,7 +168,7 @@ bool nexthop_group_equal(const struct nexthop_group *nhg1, if (nhg1 && !nhg2) return false; - if (!nhg1 && !nhg2) + if (!nhg1 && nhg2) return false; if (nexthop_group_nexthop_num(nhg1) != nexthop_group_nexthop_num(nhg2)) |
