socketutils: pass 0 to dyxlat_alloc

As it is backed by xgrowarray that has a heuristic for the case
*nmemb == 0, we don't have to pass a hard-coded initial size anymore.

* socketutils.c (genl_get_family_name): Pass 0 to dyxlat_alloc.
This commit is contained in:
Eugene Syromyatnikov
2018-10-20 01:55:37 +02:00
parent da97767c05
commit ed3e7e751d

View File

@ -944,7 +944,7 @@ genl_get_family_name(struct tcb *tcp, uint16_t id)
bool init = !dyxlat;
if (init)
dyxlat = dyxlat_alloc(32);
dyxlat = dyxlat_alloc(0);
int fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_GENERIC);
if (fd < 0)