mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-28 13:18:19 +00:00
Kernel: Use StringView::to_uint instead of String::to_uint in ProcFS
This commit is contained in:
parent
119f900451
commit
792b8ca13c
Notes:
sideshowbarker
2024-07-17 21:01:25 +09:00
Author: https://github.com/IdanHo
Commit: 792b8ca13c
Pull-request: https://github.com/SerenityOS/serenity/pull/11848
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/bgianfo ✅
1 changed files with 1 additions and 2 deletions
|
@ -973,8 +973,7 @@ ErrorOr<NonnullRefPtr<ProcFSExposedComponent>> ProcFSRootDirectory::lookup(Strin
|
||||||
return maybe_candidate.release_value();
|
return maybe_candidate.release_value();
|
||||||
}
|
}
|
||||||
|
|
||||||
String process_directory_name = name;
|
auto pid = name.to_uint<unsigned>();
|
||||||
auto pid = process_directory_name.to_uint<unsigned>();
|
|
||||||
if (!pid.has_value())
|
if (!pid.has_value())
|
||||||
return ESRCH;
|
return ESRCH;
|
||||||
auto actual_pid = pid.value();
|
auto actual_pid = pid.value();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue