changeset 9997:14bb06a33f2e

. Correctly use the BLOCKING_IO_RETURN_INT() macro in NET_Accept(). Authored by: Jung-uk Kim <jkim@FreeBSD.org>
author Greg Lewis <glewis@eyesbeyond.com>
date Tue, 10 Mar 2015 21:05:55 -0700
parents 7e7ffae84e70
children 7040749f2643
files src/solaris/native/java/net/bsd_close.c
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/native/java/net/bsd_close.c	Sun Feb 01 21:05:04 2015 -0800
+++ b/src/solaris/native/java/net/bsd_close.c	Tue Mar 10 21:05:55 2015 -0700
@@ -316,11 +316,8 @@
 }
 
 int NET_Accept(int s, struct sockaddr *addr, int *addrlen) {
-    socklen_t len = *addrlen;
-    int error = accept(s, addr, &len);
-    if (error != -1)
-        *addrlen = (int)len;
-    BLOCKING_IO_RETURN_INT( s, error );
+    /* See NET_RecvFrom() */
+    BLOCKING_IO_RETURN_INT( s, accept(s, addr, (socklen_t *)addrlen) );
 }
 
 int NET_Connect(int s, struct sockaddr *addr, int addrlen) {