Browse Source

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>
pull/89805/head
Alberto Escolar Piedras 2 months ago committed by Benjamin Cabé
parent
commit
f01a96c2f3
  1. 8
      drivers/ethernet/eth_native_tap.c

8
drivers/ethernet/eth_native_tap.c

@ -108,7 +108,7 @@ static struct gptp_hdr *check_gptp_msg(struct net_if *iface, @@ -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, @@ -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)

Loading…
Cancel
Save