diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2020-10-14 14:23:48 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2020-10-15 13:09:50 (GMT) |
commit | 6f7605774874356b87b2d0fd9b15f1da7de8ef97 (patch) | |
tree | e5834f63f3d9009e2313ebe12f460a6e629abe48 /src | |
parent | ce13b5f0472500e54afca638d6c6ef8e7090466e (diff) | |
download | hdf5-6f7605774874356b87b2d0fd9b15f1da7de8ef97.zip hdf5-6f7605774874356b87b2d0fd9b15f1da7de8ef97.tar.gz hdf5-6f7605774874356b87b2d0fd9b15f1da7de8ef97.tar.bz2 |
Update FD source
Diffstat (limited to 'src')
-rw-r--r-- | src/H5FDcore.h | 2 | ||||
-rw-r--r-- | src/H5FDdirect.h | 2 | ||||
-rw-r--r-- | src/H5FDfamily.h | 2 | ||||
-rw-r--r-- | src/H5FDhdfs.c | 26 | ||||
-rw-r--r-- | src/H5FDhdfs.h | 2 | ||||
-rw-r--r-- | src/H5FDlog.h | 2 | ||||
-rw-r--r-- | src/H5FDmulti.h | 4 | ||||
-rw-r--r-- | src/H5FDsec2.h | 2 |
8 files changed, 8 insertions, 34 deletions
diff --git a/src/H5FDcore.h b/src/H5FDcore.h index f524571..7db7e9f 100644 --- a/src/H5FDcore.h +++ b/src/H5FDcore.h @@ -20,8 +20,6 @@ #ifndef H5FDcore_H #define H5FDcore_H -#include "H5Ipublic.h" - #define H5FD_CORE (H5FD_core_init()) #ifdef __cplusplus diff --git a/src/H5FDdirect.h b/src/H5FDdirect.h index 6db3238..4c35876 100644 --- a/src/H5FDdirect.h +++ b/src/H5FDdirect.h @@ -20,8 +20,6 @@ #ifndef H5FDdirect_H #define H5FDdirect_H -#include "H5Ipublic.h" - #ifdef H5_HAVE_DIRECT #define H5FD_DIRECT (H5FD_direct_init()) #else diff --git a/src/H5FDfamily.h b/src/H5FDfamily.h index 1faf6df..55308cd 100644 --- a/src/H5FDfamily.h +++ b/src/H5FDfamily.h @@ -20,8 +20,6 @@ #ifndef H5FDfamily_H #define H5FDfamily_H -#include "H5Ipublic.h" - #define H5FD_FAMILY (H5FD_family_init()) #ifdef __cplusplus diff --git a/src/H5FDhdfs.c b/src/H5FDhdfs.c index d6e8991..b6004a1 100644 --- a/src/H5FDhdfs.c +++ b/src/H5FDhdfs.c @@ -333,10 +333,7 @@ H5FL_DEFINE_STATIC(H5FD_hdfs_t); * * Purpose: Initializes any interface-specific data or routines. * - * Return: Success: The driver ID for the hdfs driver. - * Failure: Negative - * - * Programmer: Jacob Smith 2018 + * Return: Non-negative on success/Negative on failure * *------------------------------------------------------------------------- */ @@ -389,7 +386,6 @@ H5FD_hdfs_init(void) } #endif - /* Set return value */ ret_value = H5FD_HDFS_g; done: @@ -718,13 +714,11 @@ H5FD_hdfs_fapl_get(H5FD_t *_file) /* Copy the fields of the structure */ HDmemcpy(fa, &(file->fa), sizeof(H5FD_hdfs_fapl_t)); - /* Set return value */ ret_value = fa; done: - if (ret_value == NULL) - if (fa != NULL) - H5MM_xfree(fa); + if (ret_value == NULL && fa != NULL) + H5MM_xfree(fa); /* clean up on error */ } /* H5FD_hdfs_fapl_get() */ @@ -759,9 +753,8 @@ H5FD_hdfs_fapl_copy(const void *_old_fa) ret_value = new_fa; done: - if (ret_value == NULL) - if (new_fa != NULL) - H5MM_xfree(new_fa); + if (ret_value == NULL && new_fa != NULL) + H5MM_xfree(new_fa); /* clean up on error */ FUNC_LEAVE_NOAPI(ret_value) } /* H5FD_hdfs_fapl_copy() */ @@ -827,7 +820,7 @@ hdfs_reset_stats(H5FD_hdfs_t *file) #endif if (file == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file was null"); + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file was null") for (i = 0; i <= HDFS_STATS_BIN_COUNT; i++) { file->raw[i].bytes = 0; @@ -1184,13 +1177,11 @@ hdfs_fprint_stats(FILE *stream, const H5FD_hdfs_t *file) br_val, br_suffix, /* rawdata bytes */ am_val, am_suffix, /* metadata average */ ar_val, ar_suffix); /* rawdata average */ - HDfflush(stream); } done: FUNC_LEAVE_NOAPI(ret_value); - } /* hdfs_fprint_stats */ #endif /* HDFS_STATS */ @@ -1352,7 +1343,6 @@ H5FD_hdfs_query(const H5FD_t H5_ATTR_UNUSED *_file, unsigned long *flags) /* out HDfprintf(stdout, "called %s.\n", FUNC); #endif - /* Set the VFL feature flags that this driver supports */ if (flags) { *flags = 0; *flags |= H5FD_FEAT_DATA_SIEVE; @@ -1504,7 +1494,7 @@ done: * * Function: H5FD_hdfs_read() * - * Purpose + * Purpose: * * Reads SIZE bytes of data from FILE beginning at address ADDR * into buffer BUF according to data transfer properties in DXPL_ID. @@ -1739,7 +1729,6 @@ H5Pget_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa_out) herr_t ret_value = FAIL; FUNC_ENTER_NOAPI_NOINIT - H5TRACE2("e", "i*x", fapl_id, fa_out); HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "HDFS VFD not included in the HDF5 library") @@ -1753,7 +1742,6 @@ H5Pset_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa) herr_t ret_value = FAIL; FUNC_ENTER_NOAPI_NOINIT - H5TRACE2("e", "i*x", fapl_id, fa); HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "HDFS VFD not included in the HDF5 library") diff --git a/src/H5FDhdfs.h b/src/H5FDhdfs.h index 6692ed6..a5d08b2 100644 --- a/src/H5FDhdfs.h +++ b/src/H5FDhdfs.h @@ -25,7 +25,7 @@ #ifdef H5_HAVE_LIBHDFS #define H5FD_HDFS (H5FD_hdfs_init()) #else /* H5_HAVE_LIBHDFS */ -#define H5FD_HDFS (H5I_INVALID_HID) +#define H5FD_HDFS (-1) #endif /* H5_HAVE_LIBHDFS */ /**************************************************************************** diff --git a/src/H5FDlog.h b/src/H5FDlog.h index d0c5e0c..a463c69 100644 --- a/src/H5FDlog.h +++ b/src/H5FDlog.h @@ -20,8 +20,6 @@ #ifndef H5FDlog_H #define H5FDlog_H -#include "H5Ipublic.h" - #define H5FD_LOG (H5FD_log_init()) /* Flags for H5Pset_fapl_log() */ diff --git a/src/H5FDmulti.h b/src/H5FDmulti.h index f93e2fa..a88f109 100644 --- a/src/H5FDmulti.h +++ b/src/H5FDmulti.h @@ -20,10 +20,6 @@ #ifndef H5FDmulti_H #define H5FDmulti_H -#include "H5Ipublic.h" -#include "H5Ppublic.h" /* Property lists */ -#include "H5Fpublic.h" - #define H5FD_MULTI (H5FD_multi_init()) #ifdef __cplusplus diff --git a/src/H5FDsec2.h b/src/H5FDsec2.h index db658da..4d6ee35 100644 --- a/src/H5FDsec2.h +++ b/src/H5FDsec2.h @@ -20,8 +20,6 @@ #ifndef H5FDsec2_H #define H5FDsec2_H -#include "H5Ipublic.h" - #define H5FD_SEC2 (H5FD_sec2_init()) #ifdef __cplusplus |