Remove redundant calls to set_nonblocking().
authorBen Pfaff <blp@nicira.com>
Sat, 12 Dec 2009 01:00:28 +0000 (17:00 -0800)
committerBen Pfaff <blp@nicira.com>
Sat, 12 Dec 2009 01:00:28 +0000 (17:00 -0800)
These set_nonblocking() calls are on a fd returned by make_unix_socket(),
which has already set the fd nonblocking.

lib/stream-unix.c
lib/vconn-unix.c

index a5dfd55..9046da1 100644 (file)
@@ -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));
index f24c846..f637ca0 100644 (file)
@@ -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));