summaryrefslogtreecommitdiffstats
path: root/test/h5test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/h5test.c')
-rw-r--r--test/h5test.c14
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() */
/*-------------------------------------------------------------------------