From e13eb463e03e978a203f77cbaf8bc504e05b28f3 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Wed, 28 Mar 2012 18:03:17 -0500 Subject: [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. --- src/H5FDcore.c | 14 ++------------ 1 file 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 */ -- cgit v0.12