diff options
author | Jacob Smith <jake.smith@hdfgroup.org> | 2019-09-30 18:57:09 (GMT) |
---|---|---|
committer | Jacob Smith <jake.smith@hdfgroup.org> | 2019-09-30 18:57:09 (GMT) |
commit | cab37f63144fd24d1ff39359e3d47a2c16198633 (patch) | |
tree | bf9853b215fcd0ad6ba6b61bc6d881f8c6e3f92e | |
parent | 541f50616f5d5429f3c2a3aba467f99722291c1a (diff) | |
download | hdf5-cab37f63144fd24d1ff39359e3d47a2c16198633.zip hdf5-cab37f63144fd24d1ff39359e3d47a2c16198633.tar.gz hdf5-cab37f63144fd24d1ff39359e3d47a2c16198633.tar.bz2 |
Move function-scope macro definition to file-scope.
-rw-r--r-- | test/external.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test/external.c b/test/external.c index c33e10d..4d9fef0 100644 --- a/test/external.c +++ b/test/external.c @@ -20,6 +20,9 @@ #include "external_common.h" #include "external_fname.h" +#define AEF_EXNAME_MAX_LEN 12 /* string buffer size for external file name */ + /* used in __add_external_files() */ + /*------------------------------------------------------------------------- * Function: files_have_same_contents @@ -453,8 +456,7 @@ __add_external_files( off_t offset, hsize_t max_ext_size) { -#define E_AEF_EXNAME_SIZE 12 - char exname[E_AEF_EXNAME_SIZE+1]; + char exname[AEF_EXNAME_MAX_LEN+1]; unsigned int i = 0; if (dcpl_id < 0) { @@ -463,10 +465,10 @@ __add_external_files( for (i = 0; i < n_external_files; i++) { if (HDsnprintf( exname, - E_AEF_EXNAME_SIZE, + AEF_EXNAME_MAX_LEN, "ext%d.data", i+1) - > E_AEF_EXNAME_SIZE) + > AEF_EXNAME_MAX_LEN) { HDfprintf(stderr, "External file %d overflows name buffer\n", i+1); fflush(stderr); @@ -479,7 +481,6 @@ __add_external_files( } } return 0; -#undef E_AEF_EXNAME_SIZE } /* end __add_external_files() */ |