summaryrefslogtreecommitdiff
path: root/Userland/Utilities
diff options
context:
space:
mode:
authorKarol Kosek <krkk@serenityos.org>2022-04-14 22:53:34 +0200
committerAndreas Kling <kling@serenityos.org>2022-04-18 14:17:01 +0200
commit35cb5ea47ced471ae20d7dd87135ad3121e0c272 (patch)
tree619b0b12d92c678ea5fe6e19d6bfa58ca01026f6 /Userland/Utilities
parent00782d9a59030d1fbe507539b5510c0578784aaa (diff)
downloadserenity-35cb5ea47ced471ae20d7dd87135ad3121e0c272.zip
Utilities/profile: Call split_view() using StringView for command parts
This fixes the always appearing 'No such file' error when using the -c flag, as the String was deconstructed right after running this line.
Diffstat (limited to 'Userland/Utilities')
-rw-r--r--Userland/Utilities/profile.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Utilities/profile.cpp b/Userland/Utilities/profile.cpp
index d4e2800038..d213228e96 100644
--- a/Userland/Utilities/profile.cpp
+++ b/Userland/Utilities/profile.cpp
@@ -107,7 +107,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
return 0;
}
- auto cmd_parts = String(cmd_argument).split_view(' ');
+ auto cmd_parts = StringView(cmd_argument).split_view(' ');
dbgln("Enabling profiling for PID {}", getpid());
TRY(Core::System::profiling_enable(getpid(), event_mask));