wincompat: use string_list instead of inflatable_buffer
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
828ffc88cd
commit
e98b84ab84
|
@ -113,7 +113,7 @@ err:
|
||||||
return NULL;
|
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;
|
WIN32_FIND_DATA find_data;
|
||||||
HANDLE find_handle;
|
HANDLE find_handle;
|
||||||
|
@ -125,9 +125,7 @@ static int userspace_get_wireguard_interfaces(struct inflatable_buffer *buffer)
|
||||||
do {
|
do {
|
||||||
if (strncmp("WireGuard\\", find_data.cFileName, 10))
|
if (strncmp("WireGuard\\", find_data.cFileName, 10))
|
||||||
continue;
|
continue;
|
||||||
buffer->next = strdup(find_data.cFileName + 10);
|
ret = string_list_add(list, find_data.cFileName + 10);
|
||||||
buffer->good = true;
|
|
||||||
ret = add_next_to_inflatable_buffer(buffer);
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto out;
|
goto out;
|
||||||
} while (FindNextFile(find_handle, &find_data));
|
} while (FindNextFile(find_handle, &find_data));
|
||||||
|
|
Loading…
Reference in New Issue