summaryrefslogtreecommitdiff
path: root/bgpd/bgp_open.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_open.c')
-rw-r--r--bgpd/bgp_open.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c
index 0326d01b..d045dde5 100644
--- a/bgpd/bgp_open.c
+++ b/bgpd/bgp_open.c
@@ -187,8 +187,7 @@ static const struct message orf_type_str[] =
{ ORF_TYPE_PREFIX, "Prefixlist" },
{ ORF_TYPE_PREFIX_OLD, "Prefixlist (old)" },
};
-static const int orf_type_str_max
- = sizeof(orf_type_str)/sizeof(orf_type_str[0]);
+static const int orf_type_str_max = array_size(orf_type_str);
static const struct message orf_mode_str[] =
{
@@ -196,8 +195,7 @@ static const struct message orf_mode_str[] =
{ ORF_MODE_SEND, "Send" },
{ ORF_MODE_BOTH, "Both" },
};
-static const int orf_mode_str_max
- = sizeof(orf_mode_str)/sizeof(orf_mode_str[0]);
+static const int orf_mode_str_max = array_size(orf_mode_str);
static int
bgp_capability_orf_entry (struct peer *peer, struct capability_header *hdr)
@@ -449,7 +447,7 @@ static const struct message capcode_str[] =
{ CAPABILITY_CODE_REFRESH_OLD, "Route Refresh (Old)" },
{ CAPABILITY_CODE_ORF_OLD, "ORF (Old)" },
};
-static const int capcode_str_max = sizeof(capcode_str)/sizeof(capcode_str[0]);
+static const int capcode_str_max = array_size(capcode_str);
/* Minimum sizes for length field of each cap (so not inc. the header) */
static const size_t cap_minsizes[] =