mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 12:28:42 +00:00
Simplified a method.
This commit is contained in:
1 parent
eea097961a
commit
08a5ce387b
1 file changed
+1
-3
+1
-3
@@ -71,9 +71,7 @@ set_nonblocking(int fd, int nonblocking)
|
||||
if (rc < 0)
|
||||
return false;
|
||||
rc = fcntl(fd, F_SETFL, nonblocking?(rc | O_NONBLOCK):(rc & ~O_NONBLOCK));
|
||||
if (rc < 0)
|
||||
return false;
|
||||
return true;
|
||||
return !(rc < 0);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user