summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Userland/Services/RequestServer/Protocol.cpp4
-rw-r--r--Userland/Services/RequestServer/Protocol.h3
2 files changed, 3 insertions, 4 deletions
diff --git a/Userland/Services/RequestServer/Protocol.cpp b/Userland/Services/RequestServer/Protocol.cpp
index 2db08d9685..c7b385b22d 100644
--- a/Userland/Services/RequestServer/Protocol.cpp
+++ b/Userland/Services/RequestServer/Protocol.cpp
@@ -35,13 +35,13 @@ Protocol::~Protocol()
VERIFY_NOT_REACHED();
}
-Result<Protocol::Pipe, String> Protocol::get_pipe_for_request()
+ErrorOr<Protocol::Pipe> Protocol::get_pipe_for_request()
{
int fd_pair[2] { 0 };
if (pipe(fd_pair) != 0) {
auto saved_errno = errno;
dbgln("Protocol: pipe() failed: {}", strerror(saved_errno));
- return String { strerror(saved_errno) };
+ return Error::from_errno(saved_errno);
}
fcntl(fd_pair[1], F_SETFL, fcntl(fd_pair[1], F_GETFL) | O_NONBLOCK);
return Pipe { fd_pair[0], fd_pair[1] };
diff --git a/Userland/Services/RequestServer/Protocol.h b/Userland/Services/RequestServer/Protocol.h
index b153ba8765..98f4a87da1 100644
--- a/Userland/Services/RequestServer/Protocol.h
+++ b/Userland/Services/RequestServer/Protocol.h
@@ -7,7 +7,6 @@
#pragma once
#include <AK/RefPtr.h>
-#include <AK/Result.h>
#include <AK/URL.h>
#include <RequestServer/Forward.h>
@@ -28,7 +27,7 @@ protected:
int read_fd { -1 };
int write_fd { -1 };
};
- static Result<Pipe, String> get_pipe_for_request();
+ static ErrorOr<Pipe> get_pipe_for_request();
private:
String m_name;