diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2018-06-25 15:46:14 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2018-06-25 15:46:14 (GMT) |
commit | c7b7c109aba0bce3c8180041a983245944d00c46 (patch) | |
tree | 2b41399afb69f4998c63b75b534af179436daf06 /java | |
parent | 2b1be811e7e2d36ff871ffb9d2ea4e3e6d72c0aa (diff) | |
download | hdf5-c7b7c109aba0bce3c8180041a983245944d00c46.zip hdf5-c7b7c109aba0bce3c8180041a983245944d00c46.tar.gz hdf5-c7b7c109aba0bce3c8180041a983245944d00c46.tar.bz2 |
Correct "," handling
Diffstat (limited to 'java')
-rw-r--r-- | java/src/jni/h5util.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/java/src/jni/h5util.c b/java/src/jni/h5util.c index 0a30438..5e2fe00 100644 --- a/java/src/jni/h5util.c +++ b/java/src/jni/h5util.c @@ -211,7 +211,7 @@ h5str_vlsprintf offset = H5Tget_member_offset(tid, i); mtid = H5Tget_member_type(tid, i); h5str_sprintf(str, container, mtid, ((char *) (ptr->p)) + offset, ptr->len, expand_data); - if (i < n - 1) + if ((i + 1) < n) h5str_append(str, ", "); H5Tclose(mtid); } @@ -428,7 +428,7 @@ h5str_sprintf offset = H5Tget_member_offset(tid, i); mtid = H5Tget_member_type(tid, i); h5str_sprintf(str, container, mtid, cptr + offset, ptr_len, expand_data); - if (i < n - 1) + if ((i + 1) < n) h5str_append(str, ", "); H5Tclose(mtid); } @@ -545,7 +545,7 @@ h5str_sprintf for (i = 0; i < total_elmts; i++) { h5str_sprintf(str, container, mtid, cptr + i * size, ptr_len, expand_data); - if (i < total_elmts - 1) + if ((i + 1) < total_elmts) h5str_append(str, ", "); } H5Tclose(mtid); @@ -561,7 +561,7 @@ h5str_sprintf h5str_append(str, "{"); for (i = 0; i < (int)ptr_len; i++) { h5str_sprintf(str, container, mtid, cptr + i * size, ptr_len, expand_data); - if (i < (int)ptr_len - 1) + if ((i + 1) < (int)ptr_len) h5str_append(str, ", "); } H5Tclose(mtid); |