summaryrefslogtreecommitdiff
path: root/Kernel/Devices/ZeroDevice.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-05-23 15:27:33 +0200
committerAndreas Kling <kling@serenityos.org>2020-05-23 15:27:33 +0200
commitdd924b730a7cd0bc1d5997f87e12a1df847f5961 (patch)
tree89431b78fcc151b2a6f01fe1ea11349903f79a55 /Kernel/Devices/ZeroDevice.cpp
parent2fe6b3725aef79effc9858cc73ab21c571dc5046 (diff)
downloadserenity-dd924b730a7cd0bc1d5997f87e12a1df847f5961.zip
Kernel+LibC: Fix various build issues introduced by ssize_t
Now that ssize_t is derived from size_t, we have to
Diffstat (limited to 'Kernel/Devices/ZeroDevice.cpp')
-rw-r--r--Kernel/Devices/ZeroDevice.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Devices/ZeroDevice.cpp b/Kernel/Devices/ZeroDevice.cpp
index 6a09cdf8b2..69f69defe3 100644
--- a/Kernel/Devices/ZeroDevice.cpp
+++ b/Kernel/Devices/ZeroDevice.cpp
@@ -46,14 +46,14 @@ bool ZeroDevice::can_read(const FileDescription&, size_t) const
ssize_t ZeroDevice::read(FileDescription&, size_t, u8* buffer, ssize_t size)
{
- ssize_t count = min(PAGE_SIZE, size);
+ ssize_t count = min(static_cast<ssize_t>(PAGE_SIZE), size);
memset(buffer, 0, (size_t)count);
return count;
}
ssize_t ZeroDevice::write(FileDescription&, size_t, const u8*, ssize_t size)
{
- return min(PAGE_SIZE, size);
+ return min(static_cast<ssize_t>(PAGE_SIZE), size);
}
}