2
0
mirror of https://github.com/openvswitch/ovs synced 2025-09-01 14:55:18 +00:00

socket-util: Use set_nonblocking() helper function.

There's no reason to inline this when we have a helper for it.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
This commit is contained in:
Ben Pfaff
2013-02-01 14:54:15 -08:00
parent 75b0b752d8
commit b36db11489

View File

@@ -409,13 +409,8 @@ make_unix_socket(int style, bool nonblock,
* it will only happen if style is SOCK_STREAM or SOCK_SEQPACKET, and only
* if a backlog of un-accepted connections has built up in the kernel.) */
if (nonblock) {
int flags = fcntl(fd, F_GETFL, 0);
if (flags == -1) {
error = errno;
goto error;
}
if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) == -1) {
error = errno;
error = set_nonblocking(fd);
if (error) {
goto error;
}
}