From 519c50b981eb3d719c4e6a96a899689df0109195 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 15 Oct 2021 19:15:11 +0000 Subject: Committing clang-format changes --- src/H5FDvfd_swmr_private.h | 12 ++++++------ src/H5Pfapl.c | 2 +- test/vfd_swmr_common.c | 3 +-- test/vfd_swmr_common.h | 3 ++- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/H5FDvfd_swmr_private.h b/src/H5FDvfd_swmr_private.h index 280ea2f..56cb93e 100644 --- a/src/H5FDvfd_swmr_private.h +++ b/src/H5FDvfd_swmr_private.h @@ -57,14 +57,14 @@ typedef struct eot_queue_entry { TAILQ_ENTRY(eot_queue_entry) link; } eot_queue_entry_t; -#define TOTAL_TIME_PASSED(X, Y) \ +#define TOTAL_TIME_PASSED(X, Y) \ ((double)((Y.tv_sec - X.tv_sec) * 1000000000 + (Y.tv_nsec - X.tv_nsec))) / 1000000.0 -#define TIME_PASSED_MIN(X) (unsigned int)(X/60000) -#define TIME_PASSED_SEC(X,Y) (unsigned int)((X-Y*60000)/1000) -#define TIME_PASSED_MSEC(X,Y,Z) (unsigned int)(X-Y*60000-Z*1000) -//H5_DLLVAR extern hbool_t vfd_swmr_log_on; -//H5_DLLVAR extern FILE *vfd_swmr_log_file_ptr; +#define TIME_PASSED_MIN(X) (unsigned int)(X / 60000) +#define TIME_PASSED_SEC(X, Y) (unsigned int)((X - Y * 60000) / 1000) +#define TIME_PASSED_MSEC(X, Y, Z) (unsigned int)(X - Y * 60000 - Z * 1000) +// H5_DLLVAR extern hbool_t vfd_swmr_log_on; +// H5_DLLVAR extern FILE *vfd_swmr_log_file_ptr; H5_DLLVAR unsigned int vfd_swmr_api_entries_g; diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index 35bb09e..3b39f12 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -5711,7 +5711,7 @@ H5Pset_vfd_swmr_config(hid_t plist_id, H5F_vfd_swmr_config_t *config_ptr) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "md_file_path is too long") name_len = HDstrlen(config_ptr->log_file_path); - if(name_len >H5F__MAX_VFD_SWMR_FILE_NAME_LEN) + if (name_len > H5F__MAX_VFD_SWMR_FILE_NAME_LEN) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "log_file_path is too long") /* Set the modified config */ diff --git a/test/vfd_swmr_common.c b/test/vfd_swmr_common.c index d6750e0..2cae0be 100644 --- a/test/vfd_swmr_common.c +++ b/test/vfd_swmr_common.c @@ -370,7 +370,7 @@ init_vfd_swmr_config(H5F_vfd_swmr_config_t *config, uint32_t tick_len, uint32_t } /* init_vfd_swmr_config() */ void -init_vfd_swmr_log(H5F_vfd_swmr_config_t *config, const char *log_file_fmtstr,...) +init_vfd_swmr_log(H5F_vfd_swmr_config_t *config, const char *log_file_fmtstr, ...) { va_list ap; @@ -381,7 +381,6 @@ init_vfd_swmr_log(H5F_vfd_swmr_config_t *config, const char *log_file_fmtstr,... } /* init_vfd_swmr_log() */ - /* Perform common VFD SWMR configuration on the file-access property list: * configure page buffering, set reasonable VFD SWMR defaults. */ diff --git a/test/vfd_swmr_common.h b/test/vfd_swmr_common.h index c011142..f5981a5 100644 --- a/test/vfd_swmr_common.h +++ b/test/vfd_swmr_common.h @@ -77,7 +77,8 @@ H5TEST_DLL void init_vfd_swmr_config(H5F_vfd_swmr_config_t *config, uint32_t tic hbool_t writer, hbool_t flush_raw_data, uint32_t md_pages_reserved, const char *md_file_fmtstr, ...) H5_ATTR_FORMAT(printf, 7, 8); -H5TEST_DLL void init_vfd_swmr_log(H5F_vfd_swmr_config_t *config, const char * log_file_fmtstr, ...) H5_ATTR_FORMAT(printf, 2, 3); +H5TEST_DLL void init_vfd_swmr_log(H5F_vfd_swmr_config_t *config, const char *log_file_fmtstr, ...) + H5_ATTR_FORMAT(printf, 2, 3); H5TEST_DLL hid_t vfd_swmr_create_fcpl(H5F_fspace_strategy_t fs_strategy, hsize_t fs_page_size); -- cgit v0.12