diff options
Diffstat (limited to 'tools/lib/h5diff_util.c')
-rw-r--r-- | tools/lib/h5diff_util.c | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c index 6d340d9..0d476b6 100644 --- a/tools/lib/h5diff_util.c +++ b/tools/lib/h5diff_util.c @@ -35,24 +35,27 @@ print_dimensions (int rank, hsize_t *dims) { int i; - if ( rank > 0 ) - { - - parallel_print("[" ); - for ( i = 0; i < rank-1; i++) - { - parallel_print(HSIZE_T_FORMAT, dims[i]); - parallel_print("x"); - } - - parallel_print(HSIZE_T_FORMAT, dims[rank-1]); - parallel_print("]" ); - } - else + if ( rank <= 0 ) { parallel_print("H5S_SCALAR" ); } + else + { + if (!dims) + parallel_print("dimension is NULL"); + else + { + parallel_print("["); + for ( i = 0; i < rank-1; i++) + { + parallel_print(HSIZE_T_FORMAT, dims[i]); + parallel_print("x"); + } + parallel_print(HSIZE_T_FORMAT, dims[rank-1]); + parallel_print("]" ); + } + } } @@ -180,7 +183,7 @@ diff_basename(const char *name) return NULL; /* Find the end of the base name */ - i = strlen(name); + i = HDstrlen(name); while (i>0 && '/'==name[i-1]) --i; |