diff options
Diffstat (limited to 'hl/test/test_table.c')
-rw-r--r-- | hl/test/test_table.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/hl/test/test_table.c b/hl/test/test_table.c index 3438f15..0e87a7f 100644 --- a/hl/test/test_table.c +++ b/hl/test/test_table.c @@ -123,16 +123,7 @@ static hid_t h5file_open(const char *fname, unsigned flags) { hid_t fid; /* identifier for the file */ - char *srcdir = getenv("srcdir"); /* the source directory */ - char data_file[512]=""; /* buffer to hold name of existing file */ - - /* compose the name of the file to open, using the srcdir, if appropriate */ - if (srcdir) - { - strcpy(data_file,srcdir); - strcat(data_file,"/"); - } - strcat(data_file,fname); + const char *data_file = H5_get_srcdir_filename(fname); /* open */ if ((fid = H5Fopen(data_file,flags,H5P_DEFAULT))<0) |