summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2014-03-25 12:24:27 +0100
committerGravatar Nikias Bassen2014-03-25 12:24:27 +0100
commit5f71c3b1ddbd51e331bcff13c4606fa60b062d89 (patch)
treecc72133591d1142fc2e58ae70117476e6ad9f600 /src
parent185eb2b935ea307d9ed1ad2d00240c953132e558 (diff)
downloadlibusbmuxd-5f71c3b1ddbd51e331bcff13c4606fa60b062d89.tar.gz
libusbmuxd-5f71c3b1ddbd51e331bcff13c4606fa60b062d89.tar.bz2
Fix check for validity of socket file descriptor
Diffstat (limited to 'src')
-rw-r--r--src/socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/socket.c b/src/socket.c
index ebc77e3..88578bf 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -297,7 +297,7 @@ int socket_check_fd(int fd, fd_mode fdm, unsigned int timeout)
struct timeval to;
struct timeval *pto;
- if (fd <= 0) {
+ if (fd < 0) {
if (verbose >= 2)
fprintf(stderr, "ERROR: invalid fd in check_fd %d\n", fd);
return -1;