src/win32/javavm/runtime/sys_api_md.c
Should return FALSE if fstat fails, or perhaps nonseek available, in case
fstat returns error for a pipe (as it does on OS/2).
This error could have been detected by compiling
with compilation warning for functions not returning a value
when declared to do so.
int
sysAvailable(int fd, long *pbytes) {
long cur, end;
struct stat stbuf;
if (fstat(fd, &stbuf) >= 0) {
.
.
.
}
#if defined OS2 /*ibm*/
return FALSE; /* This would be better */
return nonSeekAvailable(fd, pbytes); /* or this */
#endif /*ibm*/
}
Should return FALSE if fstat fails, or perhaps nonseek available, in case
fstat returns error for a pipe (as it does on OS/2).
This error could have been detected by compiling
with compilation warning for functions not returning a value
when declared to do so.
int
sysAvailable(int fd, long *pbytes) {
long cur, end;
struct stat stbuf;
if (fstat(fd, &stbuf) >= 0) {
.
.
.
}
#if defined OS2 /*ibm*/
return FALSE; /* This would be better */
return nonSeekAvailable(fd, pbytes); /* or this */
#endif /*ibm*/
}
- duplicates
-
JDK-4130165 (io) sysAvailable on Win32 has a code path that returns without a return stmt
- Closed
-
JDK-4129479 FileInputStream.available() does not throw IOException for closed stream (win32)
- Closed