diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2016-03-24 03:58:43 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2016-03-24 03:58:43 (GMT) |
commit | 9333a2e39c9a496f2a21a97d772493932c3f66d4 (patch) | |
tree | 45875ff8c9f35c0020dc5ef5abd6cb8733002d15 /test/h5test.c | |
parent | 32f21214bb0215e77c4819be9462e254c4532b85 (diff) | |
download | hdf5-9333a2e39c9a496f2a21a97d772493932c3f66d4.zip hdf5-9333a2e39c9a496f2a21a97d772493932c3f66d4.tar.gz hdf5-9333a2e39c9a496f2a21a97d772493932c3f66d4.tar.bz2 |
[svn-r29548] Minor normalization w/ trunk in preparation for big merge.
Tested on: 64-bit Ubuntu 15.10 w/ gcc 5.2.1
autotools serial
autotools parallel (MPICH 3.1.4)
Diffstat (limited to 'test/h5test.c')
-rw-r--r-- | test/h5test.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/h5test.c b/test/h5test.c index c010adc..8285043 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -1557,8 +1557,6 @@ getenv_all(MPI_Comm comm, int root, const char* name) * Programmer: Larry Knox * Monday, October 13, 2009 * - * Modifications: - * *------------------------------------------------------------------------- */ int @@ -1570,20 +1568,22 @@ h5_make_local_copy(const char *origfilename, const char *local_copy_name) const char *filename = H5_get_srcdir_filename(origfilename);; /* Get the test file name to copy */ /* Copy old file into temporary file */ - if((fd_old = HDopen(filename, O_RDONLY, 0666)) < 0) return -1; - if((fd_new = HDopen(local_copy_name, O_RDWR|O_CREAT|O_TRUNC, 0666)) - < 0) return -1; + if((fd_old = HDopen(filename, O_RDONLY, 0666)) < 0) + return -1; + if((fd_new = HDopen(local_copy_name, O_RDWR|O_CREAT|O_TRUNC, 0666)) < 0) + return -1; /* Copy data */ while((nread = HDread(fd_old, buf, (size_t)READ_BUF_SIZE)) > 0) - HDwrite(fd_new, buf, (size_t)nread); + if(HDwrite(fd_new, buf, (size_t)nread) < 0) + return -1; /* Close files */ if(HDclose(fd_old) < 0) return -1; if(HDclose(fd_new) < 0) return -1; return 0; -} +} /* end h5_make_local_copy() */ /*------------------------------------------------------------------------- |