summaryrefslogtreecommitdiff
path: root/Userland/Utilities/pidof.cpp
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-05-31 15:43:25 +0100
committerLinus Groh <mail@linusgroh.de>2021-06-01 21:30:16 +0100
commitf5c35fccca3394ae54647d89a160d599f4a74f04 (patch)
tree5daf1ac703d28877439d0de00bcd54091cd02e5e /Userland/Utilities/pidof.cpp
parent4f1889c2cb5273800499550082af48df7e8c022f (diff)
downloadserenity-f5c35fccca3394ae54647d89a160d599f4a74f04.zip
Userland: Replace most printf-style APIs with AK::Format APIs :^)
Diffstat (limited to 'Userland/Utilities/pidof.cpp')
-rw-r--r--Userland/Utilities/pidof.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Utilities/pidof.cpp b/Userland/Utilities/pidof.cpp
index 625c50287b..5f90e7ac0e 100644
--- a/Userland/Utilities/pidof.cpp
+++ b/Userland/Utilities/pidof.cpp
@@ -23,7 +23,7 @@ static int pid_of(const String& process_name, bool single_shot, bool omit_pid, p
for (auto& it : processes.value()) {
if (it.name == process_name) {
if (!omit_pid || it.pid != pid) {
- printf(" %d" + (displayed_at_least_one ? 0 : 1), it.pid);
+ out(displayed_at_least_one ? " {}" : "{}", it.pid);
displayed_at_least_one = true;
if (single_shot)
@@ -33,7 +33,7 @@ static int pid_of(const String& process_name, bool single_shot, bool omit_pid, p
}
if (displayed_at_least_one)
- printf("\n");
+ outln();
return 0;
}
@@ -58,7 +58,7 @@ int main(int argc, char** argv)
} else {
auto number = StringView(omit_pid_value).to_uint();
if (!number.has_value()) {
- fprintf(stderr, "Invalid value for -o\n");
+ warnln("Invalid value for -o");
args_parser.print_usage(stderr, argv[0]);
return 1;
}