summaryrefslogtreecommitdiff
path: root/Kernel/Bus
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-11-16 01:15:21 +0100
committerAndreas Kling <kling@serenityos.org>2021-11-17 00:21:13 +0100
commit216e21a1fa95ffc87c371cdd6262467df8cdb5cd (patch)
treed58f31c31215cce39557cfcc3f35b7795334aa06 /Kernel/Bus
parent008355c222980bd3520caeea9848e04dc2230df1 (diff)
downloadserenity-216e21a1fa95ffc87c371cdd6262467df8cdb5cd.zip
AK: Convert AK::Format formatting helpers to returning ErrorOr<void>
This isn't a complete conversion to ErrorOr<void>, but a good chunk. The end goal here is to propagate buffer allocation failures to the caller, and allow the use of TRY() with formatting functions.
Diffstat (limited to 'Kernel/Bus')
-rw-r--r--Kernel/Bus/PCI/Definitions.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Bus/PCI/Definitions.h b/Kernel/Bus/PCI/Definitions.h
index 1118987f4a..f563064257 100644
--- a/Kernel/Bus/PCI/Definitions.h
+++ b/Kernel/Bus/PCI/Definitions.h
@@ -298,7 +298,7 @@ class Device;
template<>
struct AK::Formatter<Kernel::PCI::Address> : Formatter<FormatString> {
- void format(FormatBuilder& builder, Kernel::PCI::Address value)
+ ErrorOr<void> format(FormatBuilder& builder, Kernel::PCI::Address value)
{
return Formatter<FormatString>::format(
builder,
@@ -308,7 +308,7 @@ struct AK::Formatter<Kernel::PCI::Address> : Formatter<FormatString> {
template<>
struct AK::Formatter<Kernel::PCI::HardwareID> : Formatter<FormatString> {
- void format(FormatBuilder& builder, Kernel::PCI::HardwareID value)
+ ErrorOr<void> format(FormatBuilder& builder, Kernel::PCI::HardwareID value)
{
return Formatter<FormatString>::format(
builder,