summaryrefslogtreecommitdiffstats
path: root/test/tarray.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2009-03-23 19:14:55 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2009-03-23 19:14:55 (GMT)
commit1598893d1403ff264bff1df49f647f3054b6f3f8 (patch)
treefa11ad6ac997d90955249790c768944ad63f0104 /test/tarray.c
parent1cc1da51338ec4ce20f229c315b3943ff6a35070 (diff)
downloadhdf5-1598893d1403ff264bff1df49f647f3054b6f3f8.zip
hdf5-1598893d1403ff264bff1df49f647f3054b6f3f8.tar.gz
hdf5-1598893d1403ff264bff1df49f647f3054b6f3f8.tar.bz2
[svn-r16595] Purpose: fix bug 1189
Description: Some files apparently exist in the wild which have corrupt symbol table messages on the root group. These files can be opened by 1.6 (which uses the cached information in the superblock) but not by 1.8. This patch fixes 1.8 and 1.9 so they can now open these files, and will correct them if necessary. Also fix some potential (rare) problems with array datatype versions. Tested: jam (parallel; h5committest not working on linew or smirom)
Diffstat (limited to 'test/tarray.c')
-rw-r--r--test/tarray.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/tarray.c b/test/tarray.c
index 8d739b9..cc0a0ca 100644
--- a/test/tarray.c
+++ b/test/tarray.c
@@ -1952,9 +1952,9 @@ test_compat(void)
/* Check the 1st field's name */
mname=H5Tget_member_name(tid1,0);
CHECK(mname, NULL, "H5Tget_member_name");
- if(HDstrcmp(mname,"i")!=0)
+ if(mname && HDstrcmp(mname,"i")!=0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n",mname);
- free(mname);
+ if(mname) free(mname);
/* Check the 1st field's offset */
off=H5Tget_member_offset(tid1,0);
@@ -1971,9 +1971,9 @@ test_compat(void)
/* Check the 2nd field's name */
mname=H5Tget_member_name(tid1,1);
CHECK(mname, NULL, "H5Tget_member_name");
- if(HDstrcmp(mname,"f")!=0)
+ if(mname && HDstrcmp(mname,"f")!=0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n",mname);
- free(mname);
+ if(mname) free(mname);
/* Check the 2nd field's offset */
off=H5Tget_member_offset(tid1,1);
@@ -2016,9 +2016,9 @@ test_compat(void)
/* Check the 3rd field's name */
mname=H5Tget_member_name(tid1,2);
CHECK(mname, NULL, "H5Tget_member_name");
- if(HDstrcmp(mname,"l")!=0)
+ if(mname && HDstrcmp(mname,"l")!=0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n",mname);
- free(mname);
+ if(mname) free(mname);
/* Check the 3rd field's offset */
off=H5Tget_member_offset(tid1,2);
@@ -2061,9 +2061,9 @@ test_compat(void)
/* Check the 4th field's name */
mname=H5Tget_member_name(tid1,3);
CHECK(mname, NULL, "H5Tget_member_name");
- if(HDstrcmp(mname,"d")!=0)
+ if(mname && HDstrcmp(mname,"d")!=0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n",mname);
- free(mname);
+ if(mname) free(mname);
/* Check the 4th field's offset */
off=H5Tget_member_offset(tid1,3);