From 983b953f021c3ab0c6da67ed0295731928ba6924 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Fri, 30 Mar 2007 20:03:18 +0000 Subject: [PATCH] reverted last check-in --- src/file.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/file.cpp b/src/file.cpp index be99fe31d..28fea84b6 100755 --- a/src/file.cpp +++ b/src/file.cpp @@ -204,7 +204,6 @@ namespace libtorrent size_type read(char* buf, size_type num_bytes) { - assert(num_bytes > 0); assert(m_open_mode & mode_in); assert(m_fd != -1); @@ -213,7 +212,7 @@ namespace libtorrent #else size_type ret = ::read(m_fd, buf, num_bytes); #endif - if (ret == -1 || ret == 0) + if (ret == -1) { std::stringstream msg; msg << "read failed: " << strerror(errno);