summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCore/IODevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibCore/IODevice.cpp')
-rw-r--r--Userland/Libraries/LibCore/IODevice.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/Userland/Libraries/LibCore/IODevice.cpp b/Userland/Libraries/LibCore/IODevice.cpp
index 6e1c16c270..21bb4f3dfd 100644
--- a/Userland/Libraries/LibCore/IODevice.cpp
+++ b/Userland/Libraries/LibCore/IODevice.cpp
@@ -47,15 +47,6 @@ ByteBuffer IODevice::read(size_t max_size)
if (m_buffered_data.size() < max_size)
populate_read_buffer(max(max_size - m_buffered_data.size(), 1024));
- if (m_buffered_data.size() > max_size) {
- if (m_error)
- return {};
- if (m_eof) {
- dbgln("IODevice::read: At EOF but there's more than max_size({}) buffered", max_size);
- return {};
- }
- }
-
auto size = min(max_size, m_buffered_data.size());
auto buffer_result = ByteBuffer::create_uninitialized(size);
if (!buffer_result.has_value()) {