summaryrefslogtreecommitdiffstats
path: root/test/stab.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/stab.c')
-rw-r--r--test/stab.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/stab.c b/test/stab.c
index acfe090..6bdba65 100644
--- a/test/stab.c
+++ b/test/stab.c
@@ -188,6 +188,7 @@ test_long(hid_t fcpl, hid_t fapl, hbool_t new_format)
{
hid_t fid = (-1); /* File ID */
hid_t g1 = (-1), g2 = (-1);
+ size_t name2Len;
char *name1 = NULL, *name2 = NULL;
char filename[NAME_BUF_SIZE];
size_t i;
@@ -207,7 +208,7 @@ test_long(hid_t fcpl, hid_t fapl, hbool_t new_format)
for (i = 0; i < LONG_NAME_LEN; i++)
name1[i] = (char)('A' + i % 26);
name1[LONG_NAME_LEN - 1] = '\0';
- size_t name2Len = (2 * LONG_NAME_LEN) + 2;
+ name2Len = (2 * LONG_NAME_LEN) + 2;
name2 = (char *)malloc(name2Len);
HDsnprintf(name2, name2Len, "%s/%s", name1, name1);