diff options
author | Andreas Kling <kling@serenityos.org> | 2021-11-11 00:55:02 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-11 01:27:46 +0100 |
commit | 8b1108e4858f797c9216dc8ae4a3918ad50c73b4 (patch) | |
tree | ca64ba25aa735d25013d76c6d83570496c742014 /Userland/Utilities/sysctl.cpp | |
parent | ad5d217e760c7fb73ffc0c4c827d767d6be8ec80 (diff) | |
download | serenity-8b1108e4858f797c9216dc8ae4a3918ad50c73b4.zip |
Everywhere: Pass AK::StringView by value
Diffstat (limited to 'Userland/Utilities/sysctl.cpp')
-rw-r--r-- | Userland/Utilities/sysctl.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Utilities/sysctl.cpp b/Userland/Utilities/sysctl.cpp index 75d4e11a39..8d1a357374 100644 --- a/Userland/Utilities/sysctl.cpp +++ b/Userland/Utilities/sysctl.cpp @@ -10,7 +10,7 @@ static bool s_set_variable = false; -static String get_variable(StringView const& name) +static String get_variable(StringView name) { auto path = String::formatted("/proc/sys/{}", name); auto file = Core::File::construct(path); @@ -26,7 +26,7 @@ static String get_variable(StringView const& name) return { (char const*)buffer.data(), buffer.size(), Chomp }; } -static bool read_variable(StringView const& name) +static bool read_variable(StringView name) { auto value = get_variable(name); if (value.is_null()) @@ -35,7 +35,7 @@ static bool read_variable(StringView const& name) return true; } -static bool write_variable(StringView const& name, StringView const& value) +static bool write_variable(StringView name, StringView value) { auto old_value = get_variable(name); if (old_value.is_null()) |