* Use the _SIZEOF_ADDR_IFREQ() macro instead of computing the length manually.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37926 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -716,8 +716,8 @@ list_interfaces(const char* name)
|
||||
for (uint32 i = 0; i < count; i++) {
|
||||
list_interface(interface->ifr_name, interface->ifr_addr.sa_family);
|
||||
|
||||
interface = (ifreq*)((addr_t)interface + IF_NAMESIZE
|
||||
+ interface->ifr_addr.sa_len);
|
||||
interface = (ifreq*)((uint8*)interface
|
||||
+ _SIZEOF_ADDR_IFREQ(interface[0]));
|
||||
}
|
||||
|
||||
free(buffer);
|
||||
|
||||
Reference in New Issue
Block a user