summaryrefslogtreecommitdiffstats
path: root/test/cross_read.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/cross_read.c')
-rwxr-xr-xtest/cross_read.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/test/cross_read.c b/test/cross_read.c
index b036217..6ce38f2 100755
--- a/test/cross_read.c
+++ b/test/cross_read.c
@@ -37,8 +37,7 @@ const char *FILENAME[] = {
static int read_data(char *fname)
{
- char pathname[1024];
- char *srcdir = getenv("srcdir"); /*where the src code is located*/
+ const char *pathname = H5_get_srcdir_filename(fname); /* Corrected test file name */
hid_t file, dataset; /* handles */
hid_t datatype;
hid_t dt;
@@ -47,14 +46,6 @@ static int read_data(char *fname)
int i, j;
unsigned nerrors = 0;
- pathname[0] = '\0';
- /* Generate correct name for test file by prepending the source path */
- if(srcdir && ((strlen(srcdir) + strlen(fname) + 1) < sizeof(pathname))) {
- strcpy(pathname, srcdir);
- strcat(pathname, "/");
- }
- strcat(pathname, fname);
-
/*
* Data and output buffer initialization.
*/