From 28b8a2ec7a2a4cd7193a6cee0c0d0faa2497ccc3 Mon Sep 17 00:00:00 2001 From: Idan Horowitz Date: Tue, 20 Apr 2021 10:53:31 +0300 Subject: [PATCH] LibIPC: Make Connection::send_sync return a NonnullOwnPtr Since we VERIFY that we received a response, the response pointer is always non-null. --- Userland/Libraries/LibIPC/Connection.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibIPC/Connection.h b/Userland/Libraries/LibIPC/Connection.h index 66bcab9a42..fe0b19f1f7 100644 --- a/Userland/Libraries/LibIPC/Connection.h +++ b/Userland/Libraries/LibIPC/Connection.h @@ -118,12 +118,12 @@ public: } template - OwnPtr send_sync(Args&&... args) + NonnullOwnPtr send_sync(Args&&... args) { post_message(RequestType(forward(args)...)); auto response = wait_for_specific_endpoint_message(); VERIFY(response); - return response; + return response.release_nonnull(); } template