diff options
| author | Andrew Cooks <acooks.at.bda@gmail.com> | 2024-05-21 10:39:47 +1000 |
|---|---|---|
| committer | Andrew Cooks <acooks.at.bda@gmail.com> | 2024-05-28 14:06:25 +1000 |
| commit | 954f2ac5819cd943d592d6bf42125146e74c6c1c (patch) | |
| tree | 54d38ba35fb9174ca9c717089a701681b79a2401 /ospf6d/ospf6_lsa.c | |
| parent | 4d06e27569ae09cfb44cfa07b2c8d027ecf0fd72 (diff) | |
ospf6d: replace OSPF6_LSA_END with ospf6_lsa_end
Replacing the macro with an inline function enables better type
checking.
No functional change.
Signed-off-by: Andrew Cooks <acooks.at.bda@gmail.com>
Diffstat (limited to 'ospf6d/ospf6_lsa.c')
| -rw-r--r-- | ospf6d/ospf6_lsa.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c index 24643164c5..b907ccbc20 100644 --- a/ospf6d/ospf6_lsa.c +++ b/ospf6d/ospf6_lsa.c @@ -66,7 +66,7 @@ static int ospf6_unknown_lsa_show(struct vty *vty, struct ospf6_lsa *lsa, char *start, *end, *current; start = ospf6_lsa_header_end(lsa->header); - end = (char *)lsa->header + ntohs(lsa->header->length); + end = ospf6_lsa_end(lsa->header); if (use_json) { json_object_string_add(json_obj, "lsaType", "unknown"); @@ -548,7 +548,7 @@ void ospf6_lsa_show_dump(struct vty *vty, struct ospf6_lsa *lsa, json_object *json = NULL; start = (uint8_t *)lsa->header; - end = (uint8_t *)lsa->header + ntohs(lsa->header->length); + end = (uint8_t *)ospf6_lsa_end(lsa->header); if (use_json) { json = json_object_new_object(); |
