errno: Remove usage of DeprecatedString

This commit is contained in:
Sam Atkins 2023-05-11 13:19:29 +01:00 committed by Andreas Kling
parent 23dd16febe
commit 6a21bbb5b2

View file

@ -47,7 +47,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
if (search) {
for (int i = 0; i < sys_nerr; i++) {
auto error = DeprecatedString::formatted("{}", strerror(i));
auto error_string = strerror(i);
StringView error { error_string, strlen(error_string) };
if (error.contains(keyword, CaseSensitivity::CaseInsensitive))
output_errno_description(i, error);
}