This is the mail archive of the
mailing list for the Java project.
Re: 3.5 PATCH: Fix Tru64 UNIX V4.0F libjava bootstrap failure innatFileChannelPosix.cc
Michael Koch wrote:
Rainer> MappedByteBufferImpl *buf
Rainer> = new MappedByteBufferImpl ((RawData *) ((char *) ptr +
align), Rainer> size, mmode == 'r');
Rainer> - if (ptr == MAP_FAILED)
Rainer> + if (ptr == (void *) MAP_FAILED)
Rainer> throw new IOException (JvNewStringLatin1 (strerror
(errno))); Rainer> buf->implPtr = reinterpret_cast<RawData*>
Rainer> buf->implLen = size+align;
... why are we checking `ptr' after creating the new
MappedByteBufferImpl? It seems more efficient and correct to check
That is Per's code. Her is probably a better person to ask.
No reason that I can think of. While I don't think it matters,
it certainly does seem cleaner to check ptr first. So feel free
to change it.