summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5diff_array.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-03-06 23:18:28 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-03-06 23:18:28 (GMT)
commit503ab9d88d6fb4b0866cb8bb77ee1df68dd735c1 (patch)
tree635b28e181a5448d4d6ec1a95b22f5efa77b27a5 /tools/lib/h5diff_array.c
parent7cbf17a03f4131c65453e8d54bae0cc0737f8929 (diff)
parent16621eeb9174ae69be31a619426ff6ad39600150 (diff)
downloadhdf5-503ab9d88d6fb4b0866cb8bb77ee1df68dd735c1.zip
hdf5-503ab9d88d6fb4b0866cb8bb77ee1df68dd735c1.tar.gz
hdf5-503ab9d88d6fb4b0866cb8bb77ee1df68dd735c1.tar.bz2
Merge pull request #325 in HDFFV/hdf5 from ~BYRN/hdf5_adb:hdf5_1_8 to hdf5_1_8
* commit '16621eeb9174ae69be31a619426ff6ad39600150': HDFFV-10128 fix test scripts with ref files HDFFV-10128 new files added HDFFV-10128 test reference files HDFFV-10128 merge from develop
Diffstat (limited to 'tools/lib/h5diff_array.c')
-rw-r--r--tools/lib/h5diff_array.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index e4b166f..fc19bbc 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -544,7 +544,7 @@ hsize_t diff_array( void *_mem1,
* Recursively call this function for each element
* H5T_STRING
* compare byte by byte in a cycle from 0 to type_size. this type_size is the
- * value obtained by the get_size function but it is the string lenght for
+ * value obtained by the get_size function but it is the string length for
* variable sized strings
* H5T_OPAQUE
* compare byte by byte in a cycle from 0 to type_size
@@ -600,7 +600,7 @@ static hsize_t diff_datum(void *_mem1,
/* Fast comparison first for atomic type by memcmp().
* It is OK not to list non-atomic type here because it will not be caught
- * by the confition, but it gives more clarity for code planning
+ * by the condition, but it gives more clarity for code planning
*/
if (type_class != H5T_REFERENCE &&
type_class != H5T_COMPOUND &&
@@ -690,6 +690,10 @@ static hsize_t diff_datum(void *_mem1,
* of length of strings.
* For now mimic the previous way.
*/
+ if(size1 != size2)
+ {
+ nfound++;
+ }
if(size1 < size2)
{
size = size1;
@@ -710,7 +714,7 @@ static hsize_t diff_datum(void *_mem1,
pad = H5Tget_strpad(m_type);
- for (u=0; u<size && (s[u] || pad!=H5T_STR_NULLTERM); u++)
+ for (u=0; u<size; u++)
nfound+=character_compare(
s1 + u,
s2 + u, /* offset */