netstat: fix format string on 32-bit archs

This commit is contained in:
Alexander V. Chernikov 2023-01-27 17:45:19 +00:00
parent 153643a5bc
commit 79111aa26f

View File

@ -129,7 +129,7 @@ prepare_ifmap_netlink(struct snl_state *ss, size_t *pifmap_size)
if (link.ifi_index >= ifmap_size) {
size_t size = roundup2(link.ifi_index + 1, 32) * sizeof(struct ifmap_entry);
if ((ifmap = realloc(ifmap, size)) == NULL)
errx(2, "realloc(%lu) failed", size);
errx(2, "realloc(%zu) failed", size);
memset(&ifmap[ifmap_size], 0,
size - ifmap_size *
sizeof(struct ifmap_entry));