From 44ffe3e5bb2659fcd4bcd65adaf5fb6e855a9c4f Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Sat, 27 Nov 2021 14:23:58 -0800 Subject: [PATCH] LibCore: Allow System::pledge execpromises argument to be omitted It appears that we don't have almost no cases of a callers passing exec promises when they call `pledge()`. To simplify the code a bit we add a default parameter that will pass nullptr for us to `pledge()`. --- Userland/Libraries/LibCore/System.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibCore/System.h b/Userland/Libraries/LibCore/System.h index c90e2f0c9f..24b68b37c1 100644 --- a/Userland/Libraries/LibCore/System.h +++ b/Userland/Libraries/LibCore/System.h @@ -13,7 +13,7 @@ namespace Core::System { #ifdef __serenity__ -ErrorOr pledge(StringView promises, StringView execpromises); +ErrorOr pledge(StringView promises, StringView execpromises = {}); ErrorOr unveil(StringView path, StringView permissions); ErrorOr> pipe2(int flags); #endif