diff options
Diffstat (limited to 'test/stab.c')
-rw-r--r-- | test/stab.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/stab.c b/test/stab.c index 697bce0..8daf9cc 100644 --- a/test/stab.c +++ b/test/stab.c @@ -198,6 +198,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; @@ -217,8 +218,8 @@ 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; - name2 = (char *)HDmalloc(name2Len); + name2Len = (2 * LONG_NAME_LEN) + 2; + name2 = (char *)malloc(name2Len); HDsnprintf(name2, name2Len, "%s/%s", name1, name1); /* Create groups */ |