mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-02-17 16:50:18 +08:00
Reverted from last change.
This commit is contained in:
parent
d968063d0f
commit
c6084cc95e
@ -212,13 +212,14 @@ NCDEFAULT_get_vars(int ncid, int varid, const size_t * start,
|
||||
to read larger chunks at a time.
|
||||
*/
|
||||
|
||||
/* memptr indicates where to store the next value */
|
||||
char* memptr = value;
|
||||
|
||||
odom_init(&odom,rank,mystart,myedges,mystride);
|
||||
|
||||
/* walk the odometer to extract values */
|
||||
while(odom_more(&odom)) {
|
||||
char* memptr = value;
|
||||
int localstatus = NC_NOERR;
|
||||
int localstatus = NC_NOERR;
|
||||
/* Read a single value */
|
||||
localstatus = NC_get_vara(ncid,varid,odom.index,nc_sizevector1,memptr,memtype);
|
||||
/* So it turns out that when get_varm is used, all errors are
|
||||
|
@ -220,13 +220,14 @@ NCDEFAULT_put_vars(int ncid, int varid, const size_t * start,
|
||||
to read larger chunks at a time.
|
||||
*/
|
||||
|
||||
/* memptr indicates where to store the next value */
|
||||
const char* memptr = value;
|
||||
|
||||
odom_init(&odom,rank,mystart,myedges,mystride);
|
||||
|
||||
/* walk the odometer to extract values */
|
||||
while(odom_more(&odom)) {
|
||||
const char* memptr = value;
|
||||
int localstatus = NC_NOERR;
|
||||
int localstatus = NC_NOERR;
|
||||
/* Write a single value */
|
||||
localstatus = NC_put_vara(ncid,varid,odom.index,nc_sizevector1,memptr,memtype);
|
||||
/* So it turns out that when get_varm is used, all errors are
|
||||
|
@ -428,7 +428,7 @@ memio_pad_length(ncio* nciop, off_t length)
|
||||
if(newmem == NULL) return NC_ENOMEM;
|
||||
|
||||
/* zero out the extra memory */
|
||||
memset((void*)((char*)newmem+memio->alloc),0,(newsize - memio->alloc));
|
||||
memset((void*)(newmem+memio->alloc),0,(newsize - memio->alloc));
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr,"realloc: %lu/%lu -> %lu/%lu\n",
|
||||
|
@ -120,9 +120,8 @@ tst_att_ordering(int cmode)
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
#ifndef WIN32
|
||||
(void) signal(SIGFPE, SIG_IGN);
|
||||
#endif
|
||||
|
||||
signed char schar_in[ATT_LEN], schar_out[ATT_LEN] = {NC_MIN_BYTE, 1, NC_MAX_BYTE};
|
||||
unsigned char uchar_in[ATT_LEN], uchar_out[ATT_LEN] = {0, 128, NC_MAX_UBYTE};
|
||||
short short_in[ATT_LEN], short_out[ATT_LEN] = {NC_MIN_SHORT, -128, NC_MAX_SHORT};
|
||||
|
Loading…
Reference in New Issue
Block a user