Skip to content

Commit

Permalink
Merge pull request #141 from mrobbetts/mrobbetts/std-copy-size-fix
Browse files Browse the repository at this point in the history
Match size of std::copy input to its output variable
  • Loading branch information
bondagit authored Sep 23, 2023
2 parents 9d9cc78 + 0236b3a commit ee01c45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion daemon/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ std::pair<std::array<uint8_t, 6>, std::string> get_interface_mac(
close(fd);

uint8_t* sa = reinterpret_cast<uint8_t*>(ifr.ifr_hwaddr.sa_data);
std::copy(sa, sa + 8, std::begin(mac));
std::copy(sa, sa + 6, std::begin(mac));

char str_mac[18];
sprintf(str_mac, "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x", mac[0], mac[1], mac[2],
Expand Down

0 comments on commit ee01c45

Please sign in to comment.