summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_message.c
diff options
context:
space:
mode:
authorBalaji.G <balajig81@gmail.com>2012-09-26 14:09:10 +0530
committerDavid Lamparter <equinox@opensourcerouting.org>2012-10-25 10:15:59 -0700
commit837d16ccbe0fca413f8927da6a34b1e97ccada8a (patch)
tree7aed5a517b619c03d11bf567f6a14cda6f8f5efe /ospf6d/ospf6_message.c
parent655071f44aab42e89bcece3a93da456fdd0d913a (diff)
downloadquagga-837d16ccbe0fca413f8927da6a34b1e97ccada8a.tar.bz2
quagga-837d16ccbe0fca413f8927da6a34b1e97ccada8a.tar.xz
*: 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 <sfeldma@cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ospf6d/ospf6_message.c')
-rw-r--r--ospf6d/ospf6_message.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c
index 01d61263..5edb70ce 100644
--- a/ospf6d/ospf6_message.c
+++ b/ospf6d/ospf6_message.c
@@ -58,8 +58,7 @@ static const struct message ospf6_message_type_str [] =
{ OSPF6_MESSAGE_TYPE_LSUPDATE, "LSUpdate" },
{ OSPF6_MESSAGE_TYPE_LSACK, "LSAck" },
};
-static const size_t ospf6_message_type_str_max =
- sizeof (ospf6_message_type_str) / sizeof (ospf6_message_type_str[0]);
+static const size_t ospf6_message_type_str_max = array_size(ospf6_message_type_str);
/* Minimum (besides the standard OSPF packet header) lengths for OSPF
packets of particular types, offset is the "type" field. */