aboutsummaryrefslogtreecommitdiff
path: root/src/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/socket.c')
-rw-r--r--src/socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/socket.c b/src/socket.c
index 3cbdc7e..4f271fe 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -295,7 +295,7 @@ ssize_t socket_get_ifnames(const psocket *test_sock, char name[][IFNAMSIZ],
assert(test_sock);
sock = socket(test_sock->family, test_sock->socktype,
test_sock->protocol);
- if (sock <= 0)
+ if (sock < 0)
return -1;
ifc.ifc_len = sizeof buf;