]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
natPlainSocketImplWin32.cc: Updated copyright.
authorMohan Embar <gnustuff@thisiscool.com>
Mon, 14 Nov 2005 17:15:18 +0000 (17:15 +0000)
committerMohan Embar <membar@gcc.gnu.org>
Mon, 14 Nov 2005 17:15:18 +0000 (17:15 +0000)
* gnu/java/net/natPlainSocketImplWin32.cc: Updated copyright.
(read): Handle count == 0 case.

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

libjava/ChangeLog
libjava/gnu/java/net/natPlainSocketImplWin32.cc

index ff104084c2330a57b4fea1210390831321c9db37..d873261c4ea52fe157fc6a7c61d1d88cb477928d 100644 (file)
@@ -1,3 +1,9 @@
+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>
 
        * testsuite/libjava.jacks/jacks.xfail (non-jls-zip-2): Now
index c4a54a90c3a1673c7872b475516260b2cd7b568f..48c7171c7c198049cfbedfb52af25aa3c3aa0a5d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation
+/* Copyright (C) 2003, 2004, 2005 Free Software Foundation
 
    This file is part of libgcj.
 
@@ -491,6 +491,11 @@ jint
 gnu::java::net::PlainSocketImpl$SocketInputStream::read(jbyteArray buffer,
   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)
     throw new ::java::lang::NullPointerException;