diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-18 19:51:33 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-18 19:51:51 +0200 |
commit | 04346eeae61d9db52bc20695015a610dd016191a (patch) | |
tree | 51ae8ff679e72b7bdee2ce34e32c6be7ac9cddc5 /src/tools/ipc.c | |
parent | timers: round up instead of down in slack_time (diff) | |
download | wireguard-monolithic-historical-04346eeae61d9db52bc20695015a610dd016191a.tar.xz wireguard-monolithic-historical-04346eeae61d9db52bc20695015a610dd016191a.zip |
tools: fix errno propagation and messages
Diffstat (limited to 'src/tools/ipc.c')
-rw-r--r-- | src/tools/ipc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/tools/ipc.c b/src/tools/ipc.c index 3f23d1d..cdb152b 100644 --- a/src/tools/ipc.c +++ b/src/tools/ipc.c @@ -185,7 +185,7 @@ static int userspace_get_wireguard_interfaces(struct inflatable_buffer *buffer) dir = opendir(SOCK_PATH); if (!dir) - return errno == ENOENT ? 0 : errno; + return errno == ENOENT ? 0 : -errno; while ((ent = readdir(dir))) { len = strlen(ent->d_name); if (len <= strlen(SOCK_SUFFIX)) @@ -964,7 +964,6 @@ char *ipc_list_devices(void) cleanup: errno = -ret; if (errno) { - perror("Error when trying to get a list of WireGuard interfaces"); free(buffer.buffer); return NULL; } |