wincompat: use string_list instead of inflatable_buffer

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2020-03-19 16:29:27 -06:00
parent 828ffc88cd
commit e98b84ab84

View file

@ -113,7 +113,7 @@ err:
return NULL;
}
static int userspace_get_wireguard_interfaces(struct inflatable_buffer *buffer)
static int userspace_get_wireguard_interfaces(struct string_list *list)
{
WIN32_FIND_DATA find_data;
HANDLE find_handle;
@ -125,9 +125,7 @@ static int userspace_get_wireguard_interfaces(struct inflatable_buffer *buffer)
do {
if (strncmp("WireGuard\\", find_data.cFileName, 10))
continue;
buffer->next = strdup(find_data.cFileName + 10);
buffer->good = true;
ret = add_next_to_inflatable_buffer(buffer);
ret = string_list_add(list, find_data.cFileName + 10);
if (ret < 0)
goto out;
} while (FindNextFile(find_handle, &find_data));