Skip to content

Commit

Permalink
Fix cast align warning (sonic-net#894)
Browse files Browse the repository at this point in the history
Signed-off-by: Ze Gan <ganze718@gmail.com>
  • Loading branch information
Pterosaur authored Aug 31, 2021
1 parent c3bf1be commit 2ce0c83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vslib/TrafficForwarder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ bool TrafficForwarder::addVlanTag(
if (cmsg->cmsg_level != SOL_PACKET || cmsg->cmsg_type != PACKET_AUXDATA)
continue;

struct tpacket_auxdata* aux = (struct tpacket_auxdata*)CMSG_DATA(cmsg);
struct tpacket_auxdata* aux = (struct tpacket_auxdata*)(void *)CMSG_DATA(cmsg);

if ((aux->tp_status & TP_STATUS_VLAN_VALID) &&
(aux->tp_status & TP_STATUS_VLAN_TPID_VALID))
Expand Down

0 comments on commit 2ce0c83

Please sign in to comment.