diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-03-19 16:29:27 -0600 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-03-19 16:29:27 -0600 |
commit | e98b84ab84ca11948f5b3dc0dddea9e0d8fd21e4 (patch) | |
tree | a5e10000e36cce847556e3715fa59faba3a465c7 /src/wincompat/ipc.c | |
parent | man: add a warning to the SaveConfig description (diff) | |
download | wireguard-tools-e98b84ab84ca11948f5b3dc0dddea9e0d8fd21e4.tar.xz wireguard-tools-e98b84ab84ca11948f5b3dc0dddea9e0d8fd21e4.zip |
wincompat: use string_list instead of inflatable_buffer
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/wincompat/ipc.c')
-rw-r--r-- | src/wincompat/ipc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/wincompat/ipc.c b/src/wincompat/ipc.c index 9dce816..ce8fdb6 100644 --- a/src/wincompat/ipc.c +++ b/src/wincompat/ipc.c @@ -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)); |