OSPFv3: Remove two unnecessary dereferences
Remove also two unnecessary ND_TCHECK_SIZE().
Moreover:
Remove an unnecessary cast.
(cherry picked from commit acd0ac744336bbf29b5ae98f07cbe58cd51f45e1)
diff --git a/print-ospf6.c b/print-ospf6.c
index 1bdcd68..4916795 100644
--- a/print-ospf6.c
+++ b/print-ospf6.c
@@ -381,7 +381,7 @@
ls_type & LS_TYPE_MASK,
tok2str(ospf6_ls_scope_values, "Unknown", ls_type & LS_SCOPE_MASK),
ls_type &0x8000 ? ", transitive" : "", /* U-bit */
- GET_IPADDR_STRING((const u_char *)ls_stateid));
+ GET_IPADDR_STRING(ls_stateid));
}
static int
@@ -552,8 +552,7 @@
if (lsa_length < sizeof (*ap))
return (1);
lsa_length -= sizeof (*ap);
- ND_TCHECK_SIZE(ap);
- ND_PRINT("\n\t\t%s", GET_IPADDR_STRING(*ap));
+ ND_PRINT("\n\t\t%s", GET_IPADDR_STRING(ap));
++ap;
}
break;
@@ -762,8 +761,7 @@
ND_PRINT("\n\t Neighbor List:");
ap = hellop->hello_neighbor;
while ((const u_char *)ap < dataend) {
- ND_TCHECK_SIZE(ap);
- ND_PRINT("\n\t %s", GET_IPADDR_STRING(*ap));
+ ND_PRINT("\n\t %s", GET_IPADDR_STRING(ap));
++ap;
}
}