From ce6531640bc18e282222881500fa7fe011b1619e Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 11 Jan 2009 10:21:18 +0000 Subject: [PATCH] fixed incorrect return codes --- src/file.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/file.cpp b/src/file.cpp index d8b843dfc..659b5b97e 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -541,7 +541,7 @@ namespace libtorrent if (f == INVALID_HANDLE_VALUE) { ec = error_code(GetLastError(), get_system_category()); - return false; + return -1; } LARGE_INTEGER offs; @@ -556,7 +556,7 @@ namespace libtorrent { ec = error_code(GetLastError(), get_system_category()); CloseHandle(f); - return false; + return -1; } CloseHandle(f); } @@ -604,7 +604,7 @@ namespace libtorrent if (ftruncate(m_fd, file_offset + size) < 0) { ec = error_code(errno, get_posix_category()); - return false; + return -1; } return (std::min)(ret, size_type(size)); #endif