Skip to content

Commit

Permalink
Move init above execution
Browse files Browse the repository at this point in the history
  • Loading branch information
byrnHDF committed Oct 21, 2020
1 parent b129a49 commit 05a7b25
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/hdfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1225,7 +1225,7 @@ test_read(void)
FAIL_IF(FAIL == H5FDset_eoa(file_raven, H5FD_MEM_DEFAULT, test.eoa_set))

/* zero buffer contents */
for (i = 0; i < HDFS_TEST_MAX_BUF_SIZE; i++)
for (i = 0; i < HDFS_TEST_MAX_BUF_SIZE; i++)
buffer[i] = 0;

/* ------------ *
Expand Down Expand Up @@ -1521,6 +1521,9 @@ main(void)
#ifdef H5_HAVE_LIBHDFS
int nerrors = 0;

static char hdfs_namenode_name[HDFS_NAMENODE_NAME_MAX_SIZE] = "";
const char *hdfs_namenode_name_env = NULL;

#endif /* H5_HAVE_LIBHDFS */

HDprintf("Testing hdfs VFD functionality.\n");
Expand All @@ -1531,9 +1534,6 @@ main(void)
* initialize tests *
********************/

static char hdfs_namenode_name[HDFS_NAMENODE_NAME_MAX_SIZE] = "";
const char *hdfs_namenode_name_env = NULL;

hdfs_namenode_name_env = HDgetenv("HDFS_TEST_NAMENODE_NAME");
if (hdfs_namenode_name_env == NULL || hdfs_namenode_name_env[0] == '\0') {
HDstrncpy(hdfs_namenode_name, "localhost", HDFS_NAMENODE_NAME_MAX_SIZE);
Expand Down

0 comments on commit 05a7b25

Please sign in to comment.