diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2018-07-18 15:13:58 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2018-07-18 15:13:58 +0200 |
commit | b30adf7145a949f181d57097fc986a4f9f5a1c17 (patch) | |
tree | 14575ec76fb36ca96e76c54543f059e837567854 /src | |
parent | d761d1c87865b17973c42bab85b221a88043537c (diff) |
Coverity CID 301781: fixed wrong if clause for socket() return value check
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/socket.c | 2 |
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; |