reverted last check-in

This commit is contained in:
Arvid Norberg 2007-03-30 20:03:18 +00:00
parent 5c9b9aefb3
commit 983b953f02
1 changed files with 1 additions and 2 deletions

View File

@ -204,7 +204,6 @@ namespace libtorrent
size_type read(char* buf, size_type num_bytes) size_type read(char* buf, size_type num_bytes)
{ {
assert(num_bytes > 0);
assert(m_open_mode & mode_in); assert(m_open_mode & mode_in);
assert(m_fd != -1); assert(m_fd != -1);
@ -213,7 +212,7 @@ namespace libtorrent
#else #else
size_type ret = ::read(m_fd, buf, num_bytes); size_type ret = ::read(m_fd, buf, num_bytes);
#endif #endif
if (ret == -1 || ret == 0) if (ret == -1)
{ {
std::stringstream msg; std::stringstream msg;
msg << "read failed: " << strerror(errno); msg << "read failed: " << strerror(errno);