mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
avoid calling NC3_inq_var_fill when ERANGE_FILL is enabled
This commit is contained in:
parent
80318f6413
commit
2a68d58433
@ -704,15 +704,15 @@ putNCvx_$1_$2(NC3_INFO* ncp, const NC_var *varp,
|
||||
size_t remaining = varp->xsz * nelems;
|
||||
int status = NC_NOERR;
|
||||
void *xp;
|
||||
void *fillp;
|
||||
void *fillp=NULL;
|
||||
|
||||
if(nelems == 0)
|
||||
return NC_NOERR;
|
||||
|
||||
assert(value != NULL);
|
||||
|
||||
fillp = malloc(varp->xsz);
|
||||
status = NC3_inq_var_fill(varp, fillp);
|
||||
ifdef(`ERANGE_FILL',`fillp = malloc(varp->xsz);
|
||||
status = NC3_inq_var_fill(varp, fillp);')
|
||||
|
||||
for(;;)
|
||||
{
|
||||
@ -741,7 +741,7 @@ putNCvx_$1_$2(NC3_INFO* ncp, const NC_var *varp,
|
||||
value += nput;
|
||||
|
||||
}
|
||||
free(fillp);
|
||||
ifdef(`ERANGE_FILL',`free(fillp);')
|
||||
|
||||
return status;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user