diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-09-15 22:13:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-15 22:13:18 (GMT) |
commit | 44a00ef876ad3e1922847e93feac57c479217fbe (patch) | |
tree | 5e9fc677913a06a71eba1342633f92e93bd07a6c /src/H5FDsubfiling/H5FDioc.c | |
parent | 59a90368cdb696205bdf15040d1a48b4f69af97f (diff) | |
download | hdf5-44a00ef876ad3e1922847e93feac57c479217fbe.zip hdf5-44a00ef876ad3e1922847e93feac57c479217fbe.tar.gz hdf5-44a00ef876ad3e1922847e93feac57c479217fbe.tar.bz2 |
Strip HD prefix from string/char C API calls (#3540)
* Strip HD prefix from string/char C API calls
* HD(f)(put|get)(s|c)
* HDstr*
* HDv*printf
* HD(s)(print|scan)f
* HDperror
But NOT:
* HDstrcase*
* HDvasprintf
* HDstrtok_r
* HDstrndup
As those are not C99 and have portability work-around
implementations. They will be handled later.
* Fix th5_system.c screwup
Diffstat (limited to 'src/H5FDsubfiling/H5FDioc.c')
-rw-r--r-- | src/H5FDsubfiling/H5FDioc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/H5FDsubfiling/H5FDioc.c b/src/H5FDsubfiling/H5FDioc.c index c58a3d5..0dfcc36 100644 --- a/src/H5FDsubfiling/H5FDioc.c +++ b/src/H5FDsubfiling/H5FDioc.c @@ -224,7 +224,7 @@ H5FD_ioc_init(void) /* Check if IOC VFD has been loaded dynamically */ env_var = HDgetenv(HDF5_DRIVER); - if (env_var && !HDstrcmp(env_var, H5FD_IOC_NAME)) { + if (env_var && !strcmp(env_var, H5FD_IOC_NAME)) { int mpi_initialized = 0; int provided = 0; @@ -528,7 +528,7 @@ H5FD__ioc_sb_encode(H5FD_t *_file, char *name, unsigned char *buf) H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get subfiling context object"); /* Encode driver name */ - HDstrncpy(name, "IOC", 9); + strncpy(name, "IOC", 9); name[8] = '\0'; /* Encode configuration structure magic number */ @@ -573,7 +573,7 @@ H5FD__ioc_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) if (NULL == (sf_context = H5_get_subfiling_object(file->context_id))) H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get subfiling context object"); - if (HDstrncmp(name, "IOC", 9)) + if (strncmp(name, "IOC", 9)) H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "invalid driver name in superblock"); /* Decode configuration structure magic number */ @@ -1495,8 +1495,8 @@ H5FD__ioc_del(const char *name, hid_t fapl) /* TODO: No support for subfile directory prefix currently */ /* TODO: Possibly try loading config file prefix from file before deleting */ - HDsnprintf(tmp_filename, PATH_MAX, "%s/" H5FD_SUBFILING_CONFIG_FILENAME_TEMPLATE, - prefix_env ? prefix_env : file_dirname, base_filename, (uint64_t)st.st_ino); + snprintf(tmp_filename, PATH_MAX, "%s/" H5FD_SUBFILING_CONFIG_FILENAME_TEMPLATE, + prefix_env ? prefix_env : file_dirname, base_filename, (uint64_t)st.st_ino); if (NULL == (config_file = fopen(tmp_filename, "r"))) { if (ENOENT == errno) { @@ -1535,8 +1535,8 @@ H5FD__ioc_del(const char *name, hid_t fapl) for (int i = 0; i < n_subfiles; i++) { /* TODO: No support for subfile directory prefix currently */ - HDsnprintf(tmp_filename, PATH_MAX, "%s/" H5FD_SUBFILING_FILENAME_TEMPLATE, file_dirname, - base_filename, (uint64_t)st.st_ino, num_digits, i + 1, n_subfiles); + snprintf(tmp_filename, PATH_MAX, "%s/" H5FD_SUBFILING_FILENAME_TEMPLATE, file_dirname, + base_filename, (uint64_t)st.st_ino, num_digits, i + 1, n_subfiles); if (HDremove(tmp_filename) < 0) { #ifdef H5FD_IOC_DEBUG |