summaryrefslogtreecommitdiff
path: root/zebra/zebra_mpls.c
diff options
context:
space:
mode:
authorvivek <vivek@cumulusnetworks.com>2016-04-18 18:02:26 +0000
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-09-23 09:30:58 -0400
commitea6bebb83c855430adc9c64c399ec9c840ebb4fd (patch)
tree12469e3443cfca506c9aaf69bf5be520b904c6cc /zebra/zebra_mpls.c
parent3ab18ff268c297e7279d71f8f82fc8ce7712c23e (diff)
Quagga: Fix memcmp usage for MPLS
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Ticket: CM-6611 Reviewed By: Trivial Testing Done: Manual in SE-1
Diffstat (limited to 'zebra/zebra_mpls.c')
-rw-r--r--zebra/zebra_mpls.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c
index 688585d6da..096f576a4c 100644
--- a/zebra/zebra_mpls.c
+++ b/zebra/zebra_mpls.c
@@ -604,20 +604,20 @@ nhlfe_nhop_match (zebra_nhlfe_t *nhlfe, enum nexthop_types_t gtype,
union g_addr *gate, char *ifname, ifindex_t ifindex)
{
struct nexthop *nhop;
- u_char cmp = -1;
+ int cmp = 1;
nhop = nhlfe->nexthop;
if (!nhop)
- return -1;
+ return 1;
if (nhop->type != gtype)
- return -1;
+ return 1;
switch (nhop->type)
{
case NEXTHOP_TYPE_IPV4:
cmp = memcmp(&(nhop->gate.ipv4), &(gate->ipv4),
- sizeof(struct in_addr));
+ sizeof(struct in_addr));
break;
case NEXTHOP_TYPE_IPV6:
case NEXTHOP_TYPE_IPV6_IFINDEX:
@@ -1086,10 +1086,10 @@ static int
snhlfe_match (zebra_snhlfe_t *snhlfe, enum nexthop_types_t gtype,
union g_addr *gate, char *ifname, ifindex_t ifindex)
{
- u_char cmp = -1;
+ int cmp = 1;
if (snhlfe->gtype != gtype)
- return -1;
+ return 1;
switch (snhlfe->gtype)
{