Skip to content

Commit

Permalink
MemoryInputStream: optimize readMacAddress
Browse files Browse the repository at this point in the history
  • Loading branch information
ZoltanBojthe committed Nov 22, 2024
1 parent 80f38c2 commit 5ae4148
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/inet/common/MemoryInputStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -437,10 +437,7 @@ class INET_API MemoryInputStream
* byte order and MSB to LSB bit order.
*/
MacAddress readMacAddress() {
MacAddress address;
for (int i = 0; i < MAC_ADDRESS_SIZE; i++)
address.setAddressByte(i, readByte());
return address;
return MacAddress(readUint48Be());
}

/**
Expand Down

0 comments on commit 5ae4148

Please sign in to comment.