diff options
Diffstat (limited to 'test/objcopy.c')
-rwxr-xr-x | test/objcopy.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/test/objcopy.c b/test/objcopy.c index 854006e..d540117 100755 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -6076,19 +6076,11 @@ test_copy_old_layout(hid_t fcpl_dst, hid_t fapl) { hid_t fid_src = -1, fid_dst = -1; /* File IDs */ hid_t did = -1, did2 = -1; /* Dataset IDs */ - char *srcdir = HDgetenv("srcdir"); /* Where the src code is located */ - char src_filename[NAME_BUF_SIZE] = ""; + const char *src_filename = H5_get_srcdir_filename(FILE_OLD_LAYOUT); /* Corrected test file name */ char dst_filename[NAME_BUF_SIZE]; TESTING("H5Ocopy(): dataset with old layout format"); - /* Generate correct name for source file by prepending the source path */ - if(srcdir && ((HDstrlen(srcdir) + HDstrlen(FILE_OLD_LAYOUT) + 1) < sizeof(src_filename))) { - HDstrcpy(src_filename, srcdir); - HDstrcat(src_filename, "/"); - } /* end if */ - HDstrcat(src_filename, FILE_OLD_LAYOUT); - /* Initialize the destination filename */ h5_fixname(FILENAME[1], fapl, dst_filename, sizeof dst_filename); |