This is the mail archive of the java-patches@sources.redhat.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch: FileDeleter fix and warning cleanups


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]