diff --git a/libhdf5/hdf5file.c b/libhdf5/hdf5file.c index 05640b98a..f566c6eec 100644 --- a/libhdf5/hdf5file.c +++ b/libhdf5/hdf5file.c @@ -964,7 +964,7 @@ nc4_create_file(const char *path, int cmode, size_t initialsz, void* parameters, /* ok */ } else if ((cmode & NC_NOCLOBBER) && (fp = fopen(path, "r"))) { fclose(fp); - return NC_EEXIST; + BAIL(NC_EEXIST); } /* Need this access plist to control how HDF5 handles open objects diff --git a/nc_test/tst_inmemory.c b/nc_test/tst_inmemory.c index b0f8e4bec..def4d7e83 100644 --- a/nc_test/tst_inmemory.c +++ b/nc_test/tst_inmemory.c @@ -20,9 +20,8 @@ redistribution conditions. #include "nc_tests.h" #include "err_macros.h" -#include - #ifdef USE_NETCDF4 +#include extern int H5Eprint1(FILE * stream); #endif