summaryrefslogtreecommitdiff
path: root/zebra/zebra_rib.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_rib.c')
-rw-r--r--zebra/zebra_rib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index b8a47031..0e29e616 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -1546,7 +1546,7 @@ rib_add_ipv4 (int type, int flags, struct prefix_ipv4 *p,
/* Set default distance by route type. */
if (distance == 0)
{
- if ((unsigned)type >= sizeof(route_info) / sizeof(route_info[0]))
+ if ((unsigned)type >= array_size(route_info))
distance = 150;
else
distance = route_info[type].distance;