Skip to content

Commit c905a89

Browse files
committed
ATRONIX: Check return value from fcntl
Complained by coverity (cherry picked from commit bfb00d9)
1 parent 38f5ab3 commit c905a89

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/os/dev-net.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,7 @@ static REBOOL Nonblocking_Mode(SOCKET sock)
100100
flags = fcntl(sock, F_GETFL, 0);
101101
flags |= O_NONBLOCK;
102102
//else flags &= ~O_NONBLOCK;
103-
fcntl(sock, F_SETFL, flags);
104-
return TRUE;
103+
return fcntl(sock, F_SETFL, flags) >= 0;
105104
#endif
106105
}
107106

0 commit comments

Comments
 (0)