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.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/Userland/Libraries/LibCore/IODevice.cpp b/Userland/Libraries/LibCore/IODevice.cpp
index cde5c55548..6dd7e3dc9c 100644
--- a/Userland/Libraries/LibCore/IODevice.cpp
+++ b/Userland/Libraries/LibCore/IODevice.cpp
@@ -33,8 +33,6 @@ const char* IODevice::error_string() const
int IODevice::read(u8* buffer, int length)
{
auto read_buffer = read(length);
- if (read_buffer.is_null())
- return 0;
memcpy(buffer, read_buffer.data(), length);
return read_buffer.size();
}
@@ -151,8 +149,6 @@ ByteBuffer IODevice::read_all()
}
data.append((const u8*)read_buffer, nread);
}
- if (data.is_empty())
- return {};
return ByteBuffer::copy(data.data(), data.size());
}