Skip to content

Commit 162ea85

Browse files
internet-apps: Pass address to array instead of iterator
1 parent 64c83af commit 162ea85

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/internet-apps/model/dhcp-client.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ DhcpClient::StartApplication()
170170
"DHCP client can not handle a chaddr larger than 16 bytes");
171171

172172
m_chaddr.fill(0);
173-
myAddress.CopyTo(m_chaddr.begin());
173+
myAddress.CopyTo(m_chaddr.data());
174174
NS_LOG_INFO("My Chaddr is " << DhcpChaddrToString(m_chaddr));
175175

176176
bool found = false;

src/internet-apps/model/dhcp-server.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ DhcpServer::AddStaticDhcpEntry(Address macAddr, Ipv4Address addr)
403403
<< ", " << m_maxAddress << "]");
404404
NS_ASSERT_MSG(macAddr.GetLength() <= 16,
405405
"DHCP server can not handle a chaddr larger than 16 bytes");
406-
macAddr.CopyTo(chAddr.begin());
406+
macAddr.CopyTo(chAddr.data());
407407

408408
NS_ASSERT_MSG(m_leasedAddresses.find(chAddr) == m_leasedAddresses.end(),
409409
"Client has already an active lease: " << m_leasedAddresses[chAddr].first);

0 commit comments

Comments
 (0)