summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2023-02-01 15:52:25 +0100
committerJohnny Willemsen <jwillemsen@remedy.nl>2023-02-01 15:52:25 +0100
commit7f4365e65442e6c9d482fa64f808303f1546fe68 (patch)
tree8d6b84b2428fbde51e84852555c3109d5d5daab8
parent6198126ce20cc418252f461621c81d19ee2b36e4 (diff)
downloadATCD-7f4365e65442e6c9d482fa64f808303f1546fe68.tar.gz
Fixed cleanup mistake
* ACE/ace/OS_NS_unistd.inl:
-rw-r--r--ACE/ace/OS_NS_unistd.inl15
1 files changed, 5 insertions, 10 deletions
diff --git a/ACE/ace/OS_NS_unistd.inl b/ACE/ace/OS_NS_unistd.inl
index cc99a4cb982..455192e4ee0 100644
--- a/ACE/ace/OS_NS_unistd.inl
+++ b/ACE/ace/OS_NS_unistd.inl
@@ -1031,21 +1031,16 @@ ACE_OS::truncate (const ACE_TCHAR *filename,
{
ACE_OS_TRACE ("ACE_OS::truncate");
#if defined (ACE_WIN32)
- ACE_HANDLE handle = ACE_OS::open (filename,
- O_WRONLY,
- ACE_DEFAULT_FILE_PERMS);
+ ACE_HANDLE handle = ACE_OS::open (filename, O_WRONLY, ACE_DEFAULT_FILE_PERMS);
LARGE_INTEGER loffset;
loffset.QuadPart = offset;
if (handle == ACE_INVALID_HANDLE)
- ACE_FAIL_RETURN (-1);
-
- else if (::SetFilePointer (handle,
- low_offset,
- &high_offset,
- FILE_BEGIN) != INVALID_SET_FILE_POINTER
- || GetLastError () == NO_ERROR)
+ {
+ ACE_FAIL_RETURN (-1);
+ }
+ else if (::SetFilePointerEx (handle, loffset, 0, FILE_BEGIN))
{
BOOL result = ::SetEndOfFile (handle);
::CloseHandle (handle);