mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-13 04:46:38 +01:00
fix warning about ifr_name size
Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
parent
96850da31e
commit
455c71ff25
1 changed files with 1 additions and 1 deletions
|
@ -344,7 +344,7 @@ namespace net
|
||||||
if(fd > 0)
|
if(fd > 0)
|
||||||
{
|
{
|
||||||
ifreq ifr;
|
ifreq ifr;
|
||||||
strncpy(ifr.ifr_name, ifa->ifa_name, IFNAMSIZ); // set interface for query
|
strncpy(ifr.ifr_name, ifa->ifa_name, IFNAMSIZ-1); // set interface for query
|
||||||
if(ioctl(fd, SIOCGIFMTU, &ifr) >= 0)
|
if(ioctl(fd, SIOCGIFMTU, &ifr) >= 0)
|
||||||
mtu = ifr.ifr_mtu; // MTU
|
mtu = ifr.ifr_mtu; // MTU
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue