diff options
Diffstat (limited to 'test/filter_plugin.c')
-rw-r--r-- | test/filter_plugin.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/test/filter_plugin.c b/test/filter_plugin.c index 1571bf2..9207d9e 100644 --- a/test/filter_plugin.c +++ b/test/filter_plugin.c @@ -847,10 +847,7 @@ test_creating_groups_using_plugins(hid_t fid) /* Create multiple groups under the top-level group */ for (i = 0; i < N_SUBGROUPS; i++) { - char *sp = subgroup_name; - - sp += snprintf(subgroup_name, sizeof(subgroup_name), SUBGROUP_PREFIX); - sprintf(sp, "%d", i); + snprintf(subgroup_name, sizeof(subgroup_name), SUBGROUP_PREFIX "%d", i); if ((sub_gid = H5Gcreate2(gid, subgroup_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR; @@ -906,10 +903,7 @@ test_opening_groups_using_plugins(hid_t fid) /* Open all the sub-groups under the top-level group */ for (i = 0; i < N_SUBGROUPS; i++) { - char *sp = subgroup_name; - - sp += snprintf(subgroup_name, sizeof(subgroup_name), SUBGROUP_PREFIX); - sprintf(sp, "%d", i); + snprintf(subgroup_name, sizeof(subgroup_name), SUBGROUP_PREFIX "%d", i); if ((sub_gid = H5Gopen2(gid, subgroup_name, H5P_DEFAULT)) < 0) TEST_ERROR; |