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:
parent
fe70e480f4
commit
f01a96c2f3
1 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue