Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed unneeded setting of int_ncid by libhdf5 layer #1445

Merged
merged 3 commits into from
Aug 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions libhdf5/hdf5create.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ extern int NC4_create_image_file(NC_FILE_INFO_T* h5, size_t);
*
* @param path The file name of the new file.
* @param cmode The creation mode flag.
* @param initialsz The proposed initial file size (advisory)
* @param parameters extra parameter info (like MPI communicator)
* @param nc Pointer to an instance of NC.
* @param initialsz The proposed initial file size (advisory, for
* in-memory netCDF-4/HDF5 files only).
* @param parameters extra parameter info (like MPI communicator).
* @param nc Pointer to an already-existing instance of NC.
*
* @return ::NC_NOERR No error.
* @return ::NC_EINVAL Invalid input (check cmode).
Expand Down Expand Up @@ -290,16 +291,13 @@ NC4_create(const char* path, int cmode, size_t initialsz, int basepe,
hdf5_set_log_level();
#endif /* LOGGING */

/* Check the cmode for validity. */
/* Check the cmode for validity. Checking parallel against
* NC_DISKLESS already done in NC_create(). */
if((cmode & ILLEGAL_CREATE_FLAGS) != 0)
{res = NC_EINVAL; goto done;}

/* check parallel against NC_DISKLESS already done in NC_create() */

nc_file->int_ncid = nc_file->ext_ncid;
return NC_EINVAL;

/* Create the netCDF-4/HDF5 file. */
res = nc4_create_file(path, cmode, initialsz, parameters, nc_file);

done:
return res;
}
2 changes: 0 additions & 2 deletions libhdf5/hdf5open.c
Original file line number Diff line number Diff line change
Expand Up @@ -887,8 +887,6 @@ NC4_open(const char *path, int mode, int basepe, size_t *chunksizehintp,
hdf5_set_log_level();
#endif /* LOGGING */

nc_file->int_ncid = nc_file->ext_ncid;

/* Open the file. */
return nc4_open_file(path, mode, parameters, nc_file);
}
Expand Down