diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2019-01-11 01:51:42 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2019-01-11 01:51:42 (GMT) |
commit | 536a32c59be69f9ae75604a31d0ec34c57cf9f00 (patch) | |
tree | 605e0c0272cce05f9b8b8ed1799c384c9894ed0e /test/tvlstr.c | |
parent | a7e0ef996a63b87cc0295b58f37f037c848a6929 (diff) | |
download | hdf5-536a32c59be69f9ae75604a31d0ec34c57cf9f00.zip hdf5-536a32c59be69f9ae75604a31d0ec34c57cf9f00.tar.gz hdf5-536a32c59be69f9ae75604a31d0ec34c57cf9f00.tar.bz2 |
C and POSIX call cleanup
Diffstat (limited to 'test/tvlstr.c')
-rw-r--r-- | test/tvlstr.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/tvlstr.c b/test/tvlstr.c index da6195c..77589bb 100644 --- a/test/tvlstr.c +++ b/test/tvlstr.c @@ -183,7 +183,7 @@ test_vlstrings_basic(void) /* Count the actual number of bytes used by the strings */ for(i=0,str_used=0; i<SPACE1_DIM1; i++) - str_used+=HDstrlen(wdata[i])+1; + str_used += HDstrlen(wdata[i])+1; /* Compare against the strings actually written */ VERIFY(size,(hsize_t)str_used,"H5Dvlen_get_buf_size"); @@ -198,7 +198,7 @@ test_vlstrings_basic(void) /* Compare data read in */ for(i = 0; i < SPACE1_DIM1; i++) { if(HDstrlen(wdata[i]) != HDstrlen(rdata[i])) { - TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",(int)i,(int)strlen(wdata[i]),(int)i,(int)strlen(rdata[i])); + TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",(int)i,(int)strlen(wdata[i]),(int)i,(int)HDstrlen(rdata[i])); continue; } /* end if */ if(HDstrcmp(wdata[i], rdata[i]) != 0 ) { @@ -300,7 +300,7 @@ test_vlstrings_special(void) /* Compare data read in */ for(i = 0; i < SPACE1_DIM1; i++) { if(HDstrlen(wdata[i]) != HDstrlen(rdata[i])) { - TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",(int)i,(int)strlen(wdata[i]),(int)i,(int)strlen(rdata[i])); + TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",(int)i,(int)strlen(wdata[i]),(int)i,(int)HDstrlen(rdata[i])); continue; } /* end if */ if((wdata[i] == NULL && rdata[i] != NULL) || (rdata[i] == NULL && wdata[i] != NULL)) { @@ -527,7 +527,7 @@ test_compact_vlstring(void) /* Compare data read in */ for(i = 0; i < SPACE1_DIM1; i++) { if(HDstrlen(wdata[i]) != HDstrlen(rdata[i])) { - TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",(int)i,(int)strlen(wdata[i]),(int)i,(int)strlen(rdata[i])); + TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",(int)i,(int)strlen(wdata[i]),(int)i,(int)HDstrlen(rdata[i])); continue; } /* end if */ if(HDstrcmp(wdata[i], rdata[i]) != 0) { @@ -802,33 +802,33 @@ static void test_vl_rewrite(void) /* Create in file 1 */ for(i=0; i<REWRITE_NDATASETS; i++) { - sprintf(name, "/set_%d", i); + HDsprintf(name, "/set_%d", i); write_scalar_dset(file1, type, space, name, name); } /* Effectively copy data from file 1 to 2 */ for(i=0; i<REWRITE_NDATASETS; i++) { - sprintf(name, "/set_%d", i); + HDsprintf(name, "/set_%d", i); read_scalar_dset(file1, type, space, name, name); write_scalar_dset(file2, type, space, name, name); } /* Read back from file 2 */ for(i = 0; i < REWRITE_NDATASETS; i++) { - sprintf(name, "/set_%d", i); + HDsprintf(name, "/set_%d", i); read_scalar_dset(file2, type, space, name, name); } /* end for */ /* Remove from file 2. */ for(i = 0; i < REWRITE_NDATASETS; i++) { - sprintf(name, "/set_%d", i); + HDsprintf(name, "/set_%d", i); ret = H5Ldelete(file2, name, H5P_DEFAULT); CHECK(ret, FAIL, "H5Ldelete"); } /* end for */ /* Effectively copy from file 1 to file 2 */ for(i = 0; i < REWRITE_NDATASETS; i++) { - sprintf(name, "/set_%d", i); + HDsprintf(name, "/set_%d", i); read_scalar_dset(file1, type, space, name, name); write_scalar_dset(file2, type, space, name, name); } /* end for */ |