Commit 99b8b611 by Mohan Embar Committed by Mohan Embar

natPlainSocketImplWin32.cc: Updated copyright.

	* gnu/java/net/natPlainSocketImplWin32.cc: Updated copyright.
	(read): Handle count == 0 case.

Co-Authored-By: David Daney <ddaney@avtrex.com>

From-SVN: r106894
parent f16fe45f
2005-11-14 Mohan Embar <gnustuff@thisiscool.com>
David Daney <ddaney@avtrex.com>
* gnu/java/net/natPlainSocketImplWin32.cc: Updated copyright.
(read): Handle count == 0 case.
2005-11-09 Tom Tromey <tromey@redhat.com> 2005-11-09 Tom Tromey <tromey@redhat.com>
* testsuite/libjava.jacks/jacks.xfail (non-jls-zip-2): Now * testsuite/libjava.jacks/jacks.xfail (non-jls-zip-2): Now
......
/* Copyright (C) 2003 Free Software Foundation /* Copyright (C) 2003, 2004, 2005 Free Software Foundation
This file is part of libgcj. This file is part of libgcj.
...@@ -491,6 +491,11 @@ jint ...@@ -491,6 +491,11 @@ jint
gnu::java::net::PlainSocketImpl$SocketInputStream::read(jbyteArray buffer, gnu::java::net::PlainSocketImpl$SocketInputStream::read(jbyteArray buffer,
jint offset, jint count) jint offset, jint count)
{ {
// If zero bytes were requested, short circuit so that recv
// doesn't signal EOF.
if (count == 0)
return 0;
if (! buffer) if (! buffer)
throw new ::java::lang::NullPointerException; throw new ::java::lang::NullPointerException;
......
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