Skip to content

Commit 09ba25c

Browse files
committed
fix strange garbage results
needs to be reviewed by maintainers
1 parent 23c14bd commit 09ba25c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libsrc/memio.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,9 @@ fprintf(stderr,"memio_open: initial memory: %lu/%lu\n",(unsigned long)memio->mem
382382
(void)close(fd);
383383
}
384384

385-
/* Use half the filesize as the blocksize ; why? */
386-
sizehint = filesize/2;
385+
/* Return 8192 as large values cause: https://github.com/Unidata/netcdf-c/issues/401 Why?
386+
Note: File modes use: blksize(fd); */
387+
sizehint = 8192;
387388

388389
fd = nc__pseudofd();
389390
*((int* )&nciop->fd) = fd;

0 commit comments

Comments
 (0)