summaryrefslogtreecommitdiffstats
path: root/tools/h5jam/h5jamgentest.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2016-06-14 23:07:03 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2016-06-14 23:07:03 (GMT)
commitd3396a79532601bf22e385f94b12e55dfb2c3bd0 (patch)
treededf3566ea2ebf40c2d7475e8a50a3f2f0d57774 /tools/h5jam/h5jamgentest.c
parent7a9e13afdb134bafc070cf8bd2087a84fd0d2334 (diff)
downloadhdf5-d3396a79532601bf22e385f94b12e55dfb2c3bd0.zip
hdf5-d3396a79532601bf22e385f94b12e55dfb2c3bd0.tar.gz
hdf5-d3396a79532601bf22e385f94b12e55dfb2c3bd0.tar.bz2
[svn-r30075] Description:
Bring object/dataset/group/named datatype features from revise_chunks branch to trunk. Also CMake support for h5format_convert and a bunch of misc. cleanups. Tested on: MacOSX/64 10.11.5 (amazon) w/serial, parallel & production (h5committest forthcoming)
Diffstat (limited to 'tools/h5jam/h5jamgentest.c')
-rw-r--r--tools/h5jam/h5jamgentest.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/tools/h5jam/h5jamgentest.c b/tools/h5jam/h5jamgentest.c
index d3166b5..7ae3169 100644
--- a/tools/h5jam/h5jamgentest.c
+++ b/tools/h5jam/h5jamgentest.c
@@ -275,20 +275,23 @@ gent_ub(const char * filename, size_t ub_size, size_t ub_fill)
/* If a user block is being used, write to it here */
if(ub_size > 0)
{
- HDassert(ub_size <= BUF_SIZE);
+ ssize_t nbytes;
- fd = HDopen(filename, O_RDWR, 0);
- HDassert(fd >= 0);
+ HDassert(ub_size <= BUF_SIZE);
- /* fill buf with pattern */
- HDmemset(buf, '\0', ub_size);
- bp = buf;
- for (u = 0; u < ub_fill; u++)
- *bp++ = pattern[u % 10];
+ fd = HDopen(filename, O_RDWR, 0);
+ HDassert(fd >= 0);
- HDwrite(fd, buf, ub_size);
+ /* fill buf with pattern */
+ HDmemset(buf, '\0', ub_size);
+ bp = buf;
+ for (u = 0; u < ub_fill; u++)
+ *bp++ = pattern[u % 10];
- HDclose(fd);
+ nbytes = HDwrite(fd, buf, ub_size);
+ HDassert(nbytes >= 0);
+
+ HDclose(fd);
}
}
@@ -299,6 +302,7 @@ create_textfile(const char *name, size_t size)
int fd;
size_t i;
char *bp;
+ ssize_t nbytes;
fd = HDcreat(name,0777);
HDassert(fd >= 0);
@@ -310,7 +314,8 @@ create_textfile(const char *name, size_t size)
for(i = 0; i < size; i++)
*bp++ = pattern[i % 10];
- HDwrite(fd, buf, size);
+ nbytes = HDwrite(fd, buf, size);
+ HDassert(nbytes >= 0);
HDfree(buf);