diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2022-07-26 21:45:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-26 21:45:46 (GMT) |
commit | ae414872f50187e64cbd6cc8f076c22cf5df2d53 (patch) | |
tree | b616f33f5daa89f213e7c64e04c63afde906e939 /utils | |
parent | 213eac2588369f75a11df6bb1788dde33c4b82e2 (diff) | |
download | hdf5-ae414872f50187e64cbd6cc8f076c22cf5df2d53.zip hdf5-ae414872f50187e64cbd6cc8f076c22cf5df2d53.tar.gz hdf5-ae414872f50187e64cbd6cc8f076c22cf5df2d53.tar.bz2 |
Develop clang 13 format (#1933)
* Update format source to clang 13
* More format changes
Diffstat (limited to 'utils')
-rw-r--r-- | utils/mirror_vfd/mirror_remote.c | 4 | ||||
-rw-r--r-- | utils/mirror_vfd/mirror_remote.h | 2 | ||||
-rw-r--r-- | utils/mirror_vfd/mirror_server.c | 6 | ||||
-rw-r--r-- | utils/mirror_vfd/mirror_writer.c | 14 | ||||
-rw-r--r-- | utils/tools/h5dwalk/h5dwalk.c | 42 |
5 files changed, 34 insertions, 34 deletions
diff --git a/utils/mirror_vfd/mirror_remote.c b/utils/mirror_vfd/mirror_remote.c index 8bb9544..170d61d 100644 --- a/utils/mirror_vfd/mirror_remote.c +++ b/utils/mirror_vfd/mirror_remote.c @@ -29,7 +29,7 @@ void mirror_log(struct mirror_log_info *info, unsigned int level, const char *format, ...) { - FILE * stream = MIRROR_LOG_DEFAULT_STREAM; + FILE *stream = MIRROR_LOG_DEFAULT_STREAM; unsigned int verbosity = MIRROR_LOG_DEFAULT_VERBOSITY; hbool_t custom = FALSE; @@ -80,7 +80,7 @@ mirror_log(struct mirror_log_info *info, unsigned int level, const char *format, void mirror_log_bytes(struct mirror_log_info *info, unsigned int level, size_t n_bytes, const unsigned char *buf) { - FILE * stream = MIRROR_LOG_DEFAULT_STREAM; + FILE *stream = MIRROR_LOG_DEFAULT_STREAM; unsigned int verbosity = MIRROR_LOG_DEFAULT_VERBOSITY; if (buf == NULL) { diff --git a/utils/mirror_vfd/mirror_remote.h b/utils/mirror_vfd/mirror_remote.h index 9415f7f..02cf41b 100644 --- a/utils/mirror_vfd/mirror_remote.h +++ b/utils/mirror_vfd/mirror_remote.h @@ -35,7 +35,7 @@ typedef struct mirror_log_info { uint32_t magic; - FILE * stream; + FILE *stream; unsigned int verbosity; char prefix[MIRROR_LOG_PREFIX_MAX + 1]; } loginfo_t; diff --git a/utils/mirror_vfd/mirror_server.c b/utils/mirror_vfd/mirror_server.c index d6b5254..95480dc 100644 --- a/utils/mirror_vfd/mirror_server.c +++ b/utils/mirror_vfd/mirror_server.c @@ -143,7 +143,7 @@ static void mybzero(void *dest, size_t size) { size_t i = 0; - char * s = NULL; + char *s = NULL; HDassert(dest); s = (char *)dest; for (i = 0; i < size; i++) { @@ -403,8 +403,8 @@ accept_connection(struct server_run *run) { struct sockaddr_in client_addr; /**/ socklen_t clilen; /**/ - struct hostent * host_port = NULL; /**/ - char * hostaddrp; /**/ + struct hostent *host_port = NULL; /**/ + char *hostaddrp; /**/ int connfd = -1; /* connection file descriptor */ if (run == NULL || run->magic != SERVER_RUN_MAGIC) { diff --git a/utils/mirror_vfd/mirror_writer.c b/utils/mirror_vfd/mirror_writer.c index 5726db5..f8d7544 100644 --- a/utils/mirror_vfd/mirror_writer.c +++ b/utils/mirror_vfd/mirror_writer.c @@ -88,8 +88,8 @@ struct mirror_session { int sockfd; uint32_t token; uint32_t xmit_count; - H5FD_t * file; - loginfo_t * loginfo; + H5FD_t *file; + loginfo_t *loginfo; H5FD_mirror_xmit_reply_t reply; }; @@ -127,7 +127,7 @@ struct sock_comm { uint32_t magic; int recd_die; H5FD_mirror_xmit_t *xmit_recd; - char * raw; + char *raw; size_t raw_size; }; @@ -151,7 +151,7 @@ struct sock_comm { */ struct mirror_writer_opts { uint32_t magic; - char * logpath; + char *logpath; }; static void mybzero(void *dest, size_t size); @@ -171,7 +171,7 @@ static void mybzero(void *dest, size_t size) { size_t i = 0; - char * s = NULL; + char *s = NULL; HDassert(dest); s = (char *)dest; for (i = 0; i < size; i++) { @@ -289,7 +289,7 @@ session_stop(struct mirror_session *session) static struct mirror_session * session_start(int socketfd, const H5FD_mirror_xmit_open_t *xmit_open) { - struct mirror_session * session = NULL; + struct mirror_session *session = NULL; struct mirror_writer_opts opts; #if 0 /* TODO: behaviro option */ char logpath[H5FD_MIRROR_XMIT_FILEPATH_MAX] = ""; @@ -731,7 +731,7 @@ do_write(struct mirror_session *session, const unsigned char *xmit_buf) haddr_t addr = 0; haddr_t sum_bytes_written = 0; H5FD_mem_t type = 0; - char * buf = NULL; + char *buf = NULL; ssize_t nbytes_in_packet = 0; H5FD_mirror_xmit_write_t xmit_write; diff --git a/utils/tools/h5dwalk/h5dwalk.c b/utils/tools/h5dwalk/h5dwalk.c index 5a22d75..e91fd19 100644 --- a/utils/tools/h5dwalk/h5dwalk.c +++ b/utils/tools/h5dwalk/h5dwalk.c @@ -85,7 +85,7 @@ struct distribute_option { uint64_t separators[MAX_DISTRIBUTE_SEPARATORS]; }; -static const char * s_opts = "hl*E*i:o:T:"; +static const char *s_opts = "hl*E*i:o:T:"; static struct h5_long_options l_opts[] = {{"help", no_arg, 'h'}, {"log_text", optional_arg, 'l'}, {"error", optional_arg, 'E'}, @@ -309,10 +309,10 @@ distribute_separator_add(struct distribute_option *option, uint64_t separator) static int distribution_parse(struct distribute_option *option, const char *string) { - char * ptr; - char * next; + char *ptr; + char *next; unsigned long long separator; - char * str; + char *str; int status = 0; if (strncmp(string, "size", strlen("size")) != 0) { @@ -456,7 +456,7 @@ print_file(mfu_flist flist, uint64_t idx) else { /* get type */ mfu_filetype type = mfu_flist_file_get_type(flist, idx); - char * type_str = type_str_unknown; + char *type_str = type_str_unknown; if (type == MFU_TYPE_DIR) { type_str = type_str_dir; } @@ -527,7 +527,7 @@ print_file_text(mfu_flist flist, uint64_t idx, char *buffer, size_t bufsize) else { /* get type */ mfu_filetype type = mfu_flist_file_get_type(flist, idx); - char * type_str = type_str_unknown; + char *type_str = type_str_unknown; if (type == MFU_TYPE_DIR) { type_str = type_str_dir; } @@ -581,7 +581,7 @@ dh5tool_flist_write_text(const char *name, mfu_flist bflist) } uint64_t idx = 0; - char * ptr = NULL; + char *ptr = NULL; /* if we block things up into 128MB chunks, how many iterations * to write everything? */ @@ -763,7 +763,7 @@ fill_file_list(mfu_flist new_flist, const char *config_filename, int myrank, int return -1; while (HDfgets(linebuf, sizeof(linebuf), config) != NULL) { struct stat statbuf; - char * eol = HDstrchr(linebuf, '\n'); + char *eol = HDstrchr(linebuf, '\n'); if (eol) *eol = '\0'; if (HDstat(linebuf, &statbuf) == 0) { @@ -784,7 +784,7 @@ count_dirpaths(int argc, int startcnt, const char *argv[], int **index_out) int k; int path_cnt = 0; int idx_count = (argc - startcnt); - int * index = NULL; + int *index = NULL; struct stat pathcheck; if (idx_count > 0) { @@ -850,7 +850,7 @@ copy_args(int argc, const char *argv[], int *mfu_argc, int *copy_len) typedef struct hash_entry { int hash; - char * name; + char *name; struct hash_entry *next; /* table Collision */ int nextCount; } hash_entry_t; @@ -934,7 +934,7 @@ run_command(int argc __attribute__((unused)), char **argv, char *cmdline, const if (log_output_in_single_file || use_stdout) { pid_t pid; int pipefd[2]; - buf_t * thisbuft = NULL; + buf_t *thisbuft = NULL; buf_t **bufs = buf_cache; if (bufs == NULL) { @@ -1061,8 +1061,8 @@ run_command(int argc __attribute__((unused)), char **argv, char *cmdline, const char logpath[2048]; char logErrors[2048]; char current_dir[2048]; - char * logbase = HDstrdup(basename(filepath)); - char * thisapp = HDstrdup(basename(toolname)); + char *logbase = HDstrdup(basename(filepath)); + char *thisapp = HDstrdup(basename(toolname)); if (processing_inputfile == 0) log_instance = get_copy_count(logbase, thisapp); @@ -1153,7 +1153,7 @@ MFU_PRED_EXEC(mfu_flist flist, uint64_t idx, void *arg) size_t b_offset; /* get pointer to encoded argc count and argv array */ - int * count_ptr = arg; + int *count_ptr = arg; char *buf = (char *)arg + sizeof(int); /* get number of argv parameters */ @@ -1182,7 +1182,7 @@ MFU_PRED_EXEC(mfu_flist flist, uint64_t idx, void *arg) if (buf[0] == '&') { const char *fname_arg = NULL; mfu_flist flist_arg; - void * check_ptr[2] = {NULL, NULL}; + void *check_ptr[2] = {NULL, NULL}; HDmemcpy(check_ptr, &buf[1], sizeof(void *)); flist_arg = (mfu_flist)check_ptr[0]; @@ -1257,7 +1257,7 @@ process_input_file(char *inputname, int myrank, int size) char linebuf[PATH_MAX] = { '\0', }; - FILE * config = HDfopen(inputname, "r"); + FILE *config = HDfopen(inputname, "r"); mfu_flist flist1 = NULL; if (config == NULL) @@ -1272,10 +1272,10 @@ process_input_file(char *inputname, int myrank, int size) while (HDfgets(linebuf, sizeof(linebuf), config) != NULL) { const char *delim = " \n"; - char * cmdline = NULL; - char * cmd = NULL; - char * arg = NULL; - char * argv[256]; + char *cmdline = NULL; + char *cmd = NULL; + char *arg = NULL; + char *argv[256]; int fileindex[256]; int filecount = 0; int token = 0; @@ -1368,7 +1368,7 @@ main(int argc, char *argv[]) int args_byte_length = -1; int mfu_argc = argc; - char * args_buf = NULL; + char *args_buf = NULL; char **h5tool_argv = copy_args(argc, argv, &mfu_argc, &args_byte_length); char *inputname = NULL; |