From 7eaf1cfdc26cdaa216f61e2cfa601862ec79e012 Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Sun, 3 Apr 2022 16:17:11 -0700 Subject: [PATCH] ls: Use `Core::System::pledge(..)` instead of LibC API --- Userland/Utilities/ls.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Userland/Utilities/ls.cpp b/Userland/Utilities/ls.cpp index 793414cb71..d26c4bc695 100644 --- a/Userland/Utilities/ls.cpp +++ b/Userland/Utilities/ls.cpp @@ -94,10 +94,7 @@ ErrorOr serenity_main(Main::Arguments arguments) flag_colorize = true; } - if (pledge("stdio rpath", nullptr) < 0) { - perror("pledge"); - return 1; - } + TRY(Core::System::pledge("stdio rpath")); Vector paths;