*: get rid of "MTYPE 0"
A few places are using 0 in place of the MTYPE_* argument. The
following rewrite of the alloc tracking won't deal with that, so let's
use MTYPE_TMP instead.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index 18eece8..2e15f99 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -218,7 +218,7 @@
nexthop = XCALLOC (MTYPE_NEXTHOP, sizeof (struct nexthop));
nexthop->type = NEXTHOP_TYPE_IFNAME;
- nexthop->ifname = XSTRDUP (0, ifname);
+ nexthop->ifname = XSTRDUP (MTYPE_TMP, ifname);
nexthop_add (rib, nexthop);
@@ -282,7 +282,7 @@
nexthop = XCALLOC (MTYPE_NEXTHOP, sizeof (struct nexthop));
nexthop->type = NEXTHOP_TYPE_IPV6_IFNAME;
nexthop->gate.ipv6 = *ipv6;
- nexthop->ifname = XSTRDUP (0, ifname);
+ nexthop->ifname = XSTRDUP (MTYPE_TMP, ifname);
nexthop_add (rib, nexthop);
@@ -2464,7 +2464,7 @@
if (gate)
si->addr.ipv4 = *gate;
if (ifname)
- si->ifname = XSTRDUP (0, ifname);
+ si->ifname = XSTRDUP (MTYPE_TMP, ifname);
/* Add new static route information to the tree with sort by
distance value and gateway address. */
@@ -2861,11 +2861,11 @@
si->addr.ipv6 = *gate;
break;
case STATIC_IPV6_IFNAME:
- si->ifname = XSTRDUP (0, ifname);
+ si->ifname = XSTRDUP (MTYPE_TMP, ifname);
break;
case STATIC_IPV6_GATEWAY_IFNAME:
si->addr.ipv6 = *gate;
- si->ifname = XSTRDUP (0, ifname);
+ si->ifname = XSTRDUP (MTYPE_TMP, ifname);
break;
}