drivers/ethernet/eth_native_tap: Avoid reusing tag name

Don't use the same name for the structure instance and type.
As that is a violation of MISRA-C 2012 rule 5.7.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
Alberto Escolar Piedras 2025-05-09 16:02:12 +02:00 committed by Benjamin Cabé
commit f01a96c2f3

View file

@ -108,7 +108,7 @@ static struct gptp_hdr *check_gptp_msg(struct net_if *iface,
bool is_tx)
{
uint8_t *msg_start = net_pkt_data(pkt);
struct gptp_hdr *gptp_hdr;
struct gptp_hdr *ghdr;
int eth_hlen;
struct net_eth_hdr *hdr;
@ -129,12 +129,12 @@ static struct gptp_hdr *check_gptp_msg(struct net_if *iface,
return false;
}
gptp_hdr = (struct gptp_hdr *)pkt->frags->frags->data;
ghdr = (struct gptp_hdr *)pkt->frags->frags->data;
} else {
gptp_hdr = (struct gptp_hdr *)(pkt->frags->data + eth_hlen);
ghdr = (struct gptp_hdr *)(pkt->frags->data + eth_hlen);
}
return gptp_hdr;
return ghdr;
}
static void update_pkt_priority(struct gptp_hdr *hdr, struct net_pkt *pkt)