mirror of https://github.com/BOINC/boinc.git
Lib: check return value of fcntl()
fixes CID 27704 found by Coverity
This commit is contained in:
parent
4c659dd00f
commit
4effc53bde
|
@ -225,7 +225,9 @@ int boinc_socket(int& fd, int protocol) {
|
||||||
return ERR_SOCKET;
|
return ERR_SOCKET;
|
||||||
}
|
}
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
fcntl(fd, F_SETFD, FD_CLOEXEC);
|
if (-1 == fcntl(fd, F_SETFD, FD_CLOEXEC)) {
|
||||||
|
return ERR_FCNTL;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue