Skip to content

Commit 0f29b45

Browse files
authored
Merge pull request #2539 from wkliao/part
replace 4194304 with READ_BLOCK_SIZE
2 parents 4a0725a + e8cea27 commit 0f29b45

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

libdispatch/dutil.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,10 +282,10 @@ NC_readfileF(FILE* stream, NCbytes* content, long long amount)
282282
#define READ_BLOCK_SIZE 4194304
283283
int ret = NC_NOERR;
284284
long long red = 0;
285-
char *part = (char*) malloc(4194304);
285+
char *part = (char*) malloc(READ_BLOCK_SIZE);
286286

287287
while(amount < 0 || red < amount) {
288-
size_t count = fread(part, 1, 4194304, stream);
288+
size_t count = fread(part, 1, READ_BLOCK_SIZE, stream);
289289
if(ferror(stream)) {ret = NC_EIO; goto done;}
290290
if(count > 0) ncbytesappendn(content,part,(unsigned long)count);
291291
red += count;

0 commit comments

Comments
 (0)