From: Ben Pfaff Date: Sat, 12 Dec 2009 01:00:28 +0000 (-0800) Subject: Remove redundant calls to set_nonblocking(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;ds=inline;h=e6e6bdad78300b27b5f42567c03c092e7bad45e9;p=openvswitch Remove redundant calls to set_nonblocking(). These set_nonblocking() calls are on a fd returned by make_unix_socket(), which has already set the fd nonblocking. --- diff --git a/lib/stream-unix.c b/lib/stream-unix.c index a5dfd55b..9046da15 100644 --- a/lib/stream-unix.c +++ b/lib/stream-unix.c @@ -88,12 +88,6 @@ punix_open(const char *name UNUSED, char *suffix, struct pstream **pstreamp) return errno; } - error = set_nonblocking(fd); - if (error) { - close(fd); - return error; - } - if (listen(fd, 10) < 0) { error = errno; VLOG_ERR("%s: listen: %s", name, strerror(error)); diff --git a/lib/vconn-unix.c b/lib/vconn-unix.c index f24c8464..f637ca0e 100644 --- a/lib/vconn-unix.c +++ b/lib/vconn-unix.c @@ -90,12 +90,6 @@ punix_open(const char *name UNUSED, char *suffix, struct pvconn **pvconnp) return errno; } - error = set_nonblocking(fd); - if (error) { - close(fd); - return error; - } - if (listen(fd, 10) < 0) { error = errno; VLOG_ERR("%s: listen: %s", name, strerror(error));