summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Gianforcaro <bgianf@serenityos.org>2022-04-03 16:17:11 -0700
committerBrian Gianforcaro <b.gianfo@gmail.com>2022-04-03 17:13:51 -0700
commit7eaf1cfdc26cdaa216f61e2cfa601862ec79e012 (patch)
treebf5275769690c107ce48a6ca9257cdb249229bd5
parentaf3751e4dd7301d1b51a6c4154eaf03b4daf2717 (diff)
downloadserenity-7eaf1cfdc26cdaa216f61e2cfa601862ec79e012.zip
ls: Use `Core::System::pledge(..)` instead of LibC API
-rw-r--r--Userland/Utilities/ls.cpp5
1 files changed, 1 insertions, 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<int> 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<StringView> paths;