Ticket #21088: ifstat-size_t.diff
File ifstat-size_t.diff, 658 bytes (added by mpapamanz@…, 15 years ago) |
---|
-
drivers.c
593 593 int ifcount[] = { 594 594 CTL_NET, PF_LINK, NETLINK_GENERIC, IFMIB_SYSTEM, IFMIB_IFCOUNT 595 595 }; 596 int count, size; 596 int count; 597 size_t size; 597 598 598 599 size = sizeof(count); 599 600 if (sysctl(ifcount, sizeof(ifcount) / sizeof(int), &count, &size, NULL, 0) < 0) { … … 607 608 int ifinfo[] = { 608 609 CTL_NET, PF_LINK, NETLINK_GENERIC, IFMIB_IFDATA, index, IFDATA_GENERAL 609 610 }; 610 int size = sizeof(*ifmd);611 size_t size = sizeof(*ifmd); 611 612 612 613 if (sysctl(ifinfo, sizeof(ifinfo) / sizeof(int), ifmd, &size, NULL, 0) < 0) 613 614 return 0;