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 /test/use_common.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 'test/use_common.c')
-rw-r--r-- | test/use_common.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/use_common.c b/test/use_common.c index a58f8db..a782eec 100644 --- a/test/use_common.c +++ b/test/use_common.c @@ -69,7 +69,7 @@ parse_option(int argc, char *const argv[], options_t *opts) exit(EXIT_SUCCESS); break; case 'f': /* usecase data file name */ - opts->filename = HDstrdup(optarg); + opts->filename = strdup(optarg); break; case 'i': /* iterations */ if ((opts->iterations = atoi(optarg)) <= 0) { @@ -137,12 +137,12 @@ parse_option(int argc, char *const argv[], options_t *opts) /* set test file name if not given */ if (!opts->filename) { /* default data file name is <progname>.h5 */ - if ((opts->filename = (char *)malloc(HDstrlen(opts->progname) + 4)) == NULL) { + if ((opts->filename = (char *)malloc(strlen(opts->progname) + 4)) == NULL) { fprintf(stderr, "malloc: failed\n"); Hgoto_error(-1); } - HDstrcpy(opts->filename, opts->progname); - HDstrcat(opts->filename, ".h5"); + strcpy(opts->filename, opts->progname); + strcat(opts->filename, ".h5"); } done: |