Commit 296746bd by David Daney Committed by David Daney

natPlainSocketImplPosix.cc (bind): Remove check for null host.

	* gnu/java/net/natPlainSocketImplPosix.cc (bind): Remove check for
	null host.

From-SVN: r132726
parent 2a1ed4fc
2008-02-27 David Daney <ddaney@avtrex.com>
* gnu/java/net/natPlainSocketImplPosix.cc (bind): Remove check for
null host.
2008-02-20 Tom Tromey <tromey@redhat.com> 2008-02-20 Tom Tromey <tromey@redhat.com>
PR libgcj/24170: PR libgcj/24170:
......
...@@ -99,12 +99,7 @@ gnu::java::net::PlainSocketImpl::bind (::java::net::InetAddress *host, jint lpor ...@@ -99,12 +99,7 @@ gnu::java::net::PlainSocketImpl::bind (::java::net::InetAddress *host, jint lpor
if (len == 4) if (len == 4)
{ {
u.address.sin_family = AF_INET; u.address.sin_family = AF_INET;
memcpy (&u.address.sin_addr, bytes, len);
if (host != NULL)
memcpy (&u.address.sin_addr, bytes, len);
else
u.address.sin_addr.s_addr = htonl (INADDR_ANY);
len = sizeof (struct sockaddr_in); len = sizeof (struct sockaddr_in);
u.address.sin_port = htons (lport); u.address.sin_port = htons (lport);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment