This commit is contained in:
edwardhartnett 2019-08-01 14:39:45 -06:00
parent 170c5b0901
commit 49dcb48c25

View File

@ -601,7 +601,7 @@ NC_HDF4_open(const char *path, int mode, int basepe, size_t *chunksizehintp,
{
NC_FILE_INFO_T *h5;
NC_HDF4_FILE_INFO_T *hdf4_file;
NC *nc1;
NC *nc;
int32 num_datasets, num_gatts;
int32 sdid;
int v, a;
@ -613,7 +613,7 @@ NC_HDF4_open(const char *path, int mode, int basepe, size_t *chunksizehintp,
LOG((1, "%s: path %s mode %d params %x", __func__, path, mode, parameters));
/* Find pointer to NC. */
if ((retval = NC_check_id(ncid, &nc1)))
if ((retval = NC_check_id(ncid, &nc)))
return retval;
/* Check the mode for validity */
@ -629,9 +629,9 @@ NC_HDF4_open(const char *path, int mode, int basepe, size_t *chunksizehintp,
return NC_EHDFERR;
/* Add necessary structs to hold netcdf-4 file data. */
if ((retval = nc4_nc4f_list_add(nc1, path, mode)))
if ((retval = nc4_nc4f_list_add(nc, path, mode)))
return retval;
h5 = (NC_FILE_INFO_T *)nc1->dispatchdata;
h5 = (NC_FILE_INFO_T *)nc->dispatchdata;
assert(h5 && h5->root_grp);
h5->no_write = NC_TRUE;
h5->root_grp->atts_read = 1;