summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools_str.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lib/h5tools_str.c')
-rw-r--r--tools/lib/h5tools_str.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 32fea3d..c611715 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -312,10 +312,9 @@ h5tools_str_prefix(h5tools_str_t *str/*in,out*/, const h5dump_t *info,
hsize_t elmtno, int ndims, hsize_t min_idx[],
hsize_t max_idx[], h5tools_context_t *ctx)
{
- hsize_t p_prod[H5S_MAX_RANK], p_idx[H5S_MAX_RANK];
- hsize_t n, i = 0;
+ hsize_t p_prod[H5S_MAX_RANK];
+ hsize_t i = 0;
hsize_t curr_pos=elmtno;
-
h5tools_str_reset(str);
@@ -327,13 +326,6 @@ h5tools_str_prefix(h5tools_str_t *str/*in,out*/, const h5dump_t *info,
for (i = ndims - 1, p_prod[ndims - 1] = 1; i > 0; --i)
p_prod[i - 1] = (max_idx[i] - min_idx[i]) * p_prod[i];
- /* Calculate the index values from the element number. */
- for (i = 0, n = elmtno; i < (hsize_t)ndims; i++) {
- p_idx[i] = n / p_prod[i] + min_idx[i];
- n %= p_prod[i];
- }
-
-
for ( i = 0; i < (hsize_t)ndims; i++)
{
ctx->pos[i] = curr_pos/ctx->acc[i];