From 837d16ccbe0fca413f8927da6a34b1e97ccada8a Mon Sep 17 00:00:00 2001 From: "Balaji.G" Date: Wed, 26 Sep 2012 14:09:10 +0530 Subject: *: use array_size() helper macro Use the array_size() helper macro. Replaces several instances of local macros with the same definition. Reviewed-by: Scott Feldman Signed-off-by: David Lamparter --- zebra/zebra_rib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'zebra/zebra_rib.c') 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; -- cgit v1.2.3