diff options
author | Tim Schumacher <timschumi@gmx.de> | 2022-12-08 14:50:31 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-12-10 11:49:24 +0000 |
commit | 8940f2da7fec4b4e375777c861e65ff04465f255 (patch) | |
tree | d1ac58cae77af94ea378a93fb818e8787faed542 /Userland/Utilities/ps.cpp | |
parent | e338a0656dd8e99e9ed64abf98d15e219adb9755 (diff) | |
download | serenity-8940f2da7fec4b4e375777c861e65ff04465f255.zip |
LibCore: Use `Core::Stream` for `ProcessStatisticsReader`
Diffstat (limited to 'Userland/Utilities/ps.cpp')
-rw-r--r-- | Userland/Utilities/ps.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Userland/Utilities/ps.cpp b/Userland/Utilities/ps.cpp index bfce160cf3..8bddf29722 100644 --- a/Userland/Utilities/ps.cpp +++ b/Userland/Utilities/ps.cpp @@ -98,11 +98,9 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) cmd_column = add_column("CMD", Alignment::Left); } - auto all_processes = Core::ProcessStatisticsReader::get_all(); - if (!all_processes.has_value()) - return 1; + auto all_processes = TRY(Core::ProcessStatisticsReader::get_all()); - auto& processes = all_processes.value().processes; + auto& processes = all_processes.processes; if (!pid_list.is_empty()) { every_process_flag = true; |