Skip to content

Commit

Permalink
Simplified buffer allocation to use uniform initialization.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimi1010 committed Jan 8, 2025
1 parent f343c74 commit 679bdbd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Packet++/src/ArpLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ namespace pcpp
{
constexpr size_t headerLen = sizeof(arphdr);
m_DataLen = headerLen;
m_Data = new uint8_t[headerLen];
memset(m_Data, 0, headerLen);
m_Data = new uint8_t[headerLen]{};
m_Protocol = ARP;

arphdr* arpHeader = getArpHeader();
Expand Down

0 comments on commit 679bdbd

Please sign in to comment.