summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_lsa.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2020-04-08 07:57:15 +0200
committerDonatas Abraitis <donatas.abraitis@gmail.com>2020-04-08 16:15:06 +0200
commitc4efd0f4235d1151a95add06ad5ccb42c7dcff21 (patch)
tree9aaff71f3b3ae6c23457092f6c78a25deec6adb7 /ospfd/ospf_lsa.c
parentMerge pull request #6180 from mjstapp/fix_bgp_ecomm_sa (diff)
downloadfrr-c4efd0f4235d1151a95add06ad5ccb42c7dcff21.tar.xz
frr-c4efd0f4235d1151a95add06ad5ccb42c7dcff21.zip
*: Do not cast to the same type
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'ospfd/ospf_lsa.c')
-rw-r--r--ospfd/ospf_lsa.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c
index d50f390e3..088f7f31c 100644
--- a/ospfd/ospf_lsa.c
+++ b/ospfd/ospf_lsa.c
@@ -123,7 +123,7 @@ int get_age(struct ospf_lsa *lsa)
one-based. */
uint16_t ospf_lsa_checksum(struct lsa_header *lsa)
{
- uint8_t *buffer = (uint8_t *)&lsa->options;
+ uint8_t *buffer = &lsa->options;
int options_offset = buffer - (uint8_t *)&lsa->ls_age; /* should be 2 */
/* Skip the AGE field */
@@ -138,7 +138,7 @@ uint16_t ospf_lsa_checksum(struct lsa_header *lsa)
int ospf_lsa_checksum_valid(struct lsa_header *lsa)
{
- uint8_t *buffer = (uint8_t *)&lsa->options;
+ uint8_t *buffer = &lsa->options;
int options_offset = buffer - (uint8_t *)&lsa->ls_age; /* should be 2 */
/* Skip the AGE field */
@@ -2845,8 +2845,7 @@ void ospf_lsa_maxage_delete(struct ospf *ospf, struct ospf_lsa *lsa)
lsa_prefix.prefixlen = sizeof(lsa_prefix.u.ptr) * CHAR_BIT;
lsa_prefix.u.ptr = (uintptr_t)lsa;
- if ((rn = route_node_lookup(ospf->maxage_lsa,
- (struct prefix *)&lsa_prefix))) {
+ if ((rn = route_node_lookup(ospf->maxage_lsa, &lsa_prefix))) {
if (rn->info == lsa) {
UNSET_FLAG(lsa->flags, OSPF_LSA_IN_MAXAGE);
ospf_lsa_unlock(&lsa); /* maxage_lsa */
@@ -2888,7 +2887,7 @@ void ospf_lsa_maxage(struct ospf *ospf, struct ospf_lsa *lsa)
lsa_prefix.prefixlen = sizeof(lsa_prefix.u.ptr) * CHAR_BIT;
lsa_prefix.u.ptr = (uintptr_t)lsa;
- rn = route_node_get(ospf->maxage_lsa, (struct prefix *)&lsa_prefix);
+ rn = route_node_get(ospf->maxage_lsa, &lsa_prefix);
if (rn->info != NULL) {
if (IS_DEBUG_OSPF(lsa, LSA_FLOODING))
zlog_debug(