This is the mail archive of the
java-patches@sources.redhat.com
mailing list for the Java project.
Re: Patch: FileDeleter fix and warning cleanups
- To: Bryce McKinlay <bryce at albatross dot co dot nz>
- Subject: Re: Patch: FileDeleter fix and warning cleanups
- From: Tom Tromey <tromey at cygnus dot com>
- Date: 05 Sep 2000 10:59:29 -0600
- Cc: java-patches at sourceware dot cygnus dot com
- References: <39B4D3BB.31442BD2@albatross.co.nz>
- Reply-To: tromey at cygnus dot com
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