Patch: FileDeleter fix and warning cleanups

Tom Tromey tromey@cygnus.com
Tue Sep 5 09:54:00 GMT 2000


Bryce> 	* java/net/natPlainDatagramSocketImpl.cc (send): Remove unreachable 
Bryce> 	block.

I don't think this block is unreachable:

Bryce>    if (::sendto (fnum, (char *) dbytes, p->getLength(), 0, ptr, len) >= 0)
Bryce>      return;
Bryce> - error:
Bryce> -  char* strerr = strerror (errno);
Bryce> -  JvThrow (new java::io::IOException (JvNewStringUTF (strerr)));
Bryce>  }

What if ::sendto returns -1?  Then it falls through to the error: block.
However, the label can definitely be removed.

Tom


More information about the Java-patches mailing list