summaryrefslogtreecommitdiffstats
path: root/proto/bgp/attrs.c
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-04-12 15:21:23 +0200
committerMartin Mares <mj@ucw.cz>2000-04-12 15:21:23 +0200
commit775063494694d247b340bb1145e509e31af27802 (patch)
tree82c4fa2f3411d25aff61132b928b9055ea8881a8 /proto/bgp/attrs.c
parentdcab78904794156483878b4b8cd924e30a71bcdd (diff)
downloadbird-775063494694d247b340bb1145e509e31af27802.tar
bird-775063494694d247b340bb1145e509e31af27802.zip
Introduced `ARRAY_SIZE' macro to replace all the sizeof(a)/sizeof(*a) constructs.
Diffstat (limited to 'proto/bgp/attrs.c')
-rw-r--r--proto/bgp/attrs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c
index 5c1e70d..350123a 100644
--- a/proto/bgp/attrs.c
+++ b/proto/bgp/attrs.c
@@ -185,8 +185,7 @@ bgp_get_bucket(struct bgp_proto *p, ea_list *old, ea_list *tmp)
}
/* Ensure that there are all mandatory attributes */
- /* FIXME: Introduce array size macro */
- for(i=0; i<sizeof(bgp_mandatory_attrs)/sizeof(bgp_mandatory_attrs[0]); i++)
+ for(i=0; i<ARRAY_SIZE(bgp_mandatory_attrs); i++)
if (!(seen & (1 << bgp_mandatory_attrs[i])))
{
log(L_ERR "%s: Mandatory attribute %s missing", p->p.name, bgp_attr_table[bgp_mandatory_attrs[i]].name);