summaryrefslogtreecommitdiffstats
path: root/src/H5FDcore.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2012-03-28 23:03:17 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2012-03-28 23:03:17 (GMT)
commite13eb463e03e978a203f77cbaf8bc504e05b28f3 (patch)
tree544405f1fb741acffd0442466cb3d4db196356b7 /src/H5FDcore.c
parent6cef6bca1f058a2a39c7c75680096ce32be2a504 (diff)
downloadhdf5-e13eb463e03e978a203f77cbaf8bc504e05b28f3.zip
hdf5-e13eb463e03e978a203f77cbaf8bc504e05b28f3.tar.gz
hdf5-e13eb463e03e978a203f77cbaf8bc504e05b28f3.tar.bz2
[svn-r22178] Fixed a bad merge where truncate was called twice in the core VFD.
Minor change: tested on jam, koala, ostrich and 64-bit Windows 7 with the core VFD set.
Diffstat (limited to 'src/H5FDcore.c')
-rw-r--r--src/H5FDcore.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/H5FDcore.c b/src/H5FDcore.c
index 940d4c7..ff99cab 100644
--- a/src/H5FDcore.c
+++ b/src/H5FDcore.c
@@ -1147,20 +1147,10 @@ if(file->eof < new_eof)
* re-extended later. This may happen on Open VMS. */
if(-1 == HDlseek(file->fd, (HDoff_t)0, SEEK_SET))
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
-#endif
- if(-1 == HDftruncate(file->fd, (HDoff_t)file->eoa))
+#endif /* H5_VMS */
+ if(-1 == HDftruncate(file->fd, (HDoff_t)new_eof))
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
#endif /* H5_HAVE_WIN32_API */
-
-#ifdef H5_VMS
- /* Reset seek offset to the beginning of the file, so that the file isn't
- * re-extended later. This may happen on Open VMS. */
- if(-1 == HDlseek(file->fd, 0, SEEK_SET))
- HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
-#endif
-
- if(-1 == HDftruncate(file->fd, (off_t)new_eof))
- HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
} /* end if */
/* Update the eof value */