* syscalls.cc (truncate64): Don't second-guess errno if open fails.

This commit is contained in:
Christopher Faylor
2004-12-01 15:00:40 +00:00
parent ee58ee4a28
commit 576bfeeca8
4 changed files with 1150 additions and 1164 deletions

View File

@@ -1734,9 +1734,7 @@ truncate64 (const char *pathname, _off64_t length)
fd = open (pathname, O_RDWR);
if (fd == -1)
set_errno (EBADF);
else
if (fd != -1)
{
res = ftruncate64 (fd, length);
close (fd);