mirror of https://github.com/BOINC/boinc.git
Lib: check return value of select()
fixes CID 27700 found by Coverity
This commit is contained in:
parent
230af4a5df
commit
3320af26e1
|
@ -204,7 +204,10 @@ int RPC_CLIENT::init_poll() {
|
|||
BOINCTRACE("init_poll(): sock = %d\n", sock);
|
||||
|
||||
tv.tv_sec = tv.tv_usec = 0;
|
||||
select(FD_SETSIZE, &read_fds, &write_fds, &error_fds, &tv);
|
||||
if (-1 == select(FD_SETSIZE, &read_fds, &write_fds, &error_fds, &tv)) {
|
||||
BOINCTRACE("init_poll(): select(): %s (%d)\n", strerror(errno), errno);
|
||||
return ERR_SELECT;
|
||||
}
|
||||
retval = 0;
|
||||
if (FD_ISSET(sock, &error_fds)) {
|
||||
retval = ERR_CONNECT;
|
||||
|
|
Loading…
Reference in New Issue