From 792b8ca13ca13e6ea5dfa51280ce5c83164fd656 Mon Sep 17 00:00:00 2001 From: Idan Horowitz Date: Wed, 12 Jan 2022 23:23:52 +0200 Subject: [PATCH] Kernel: Use StringView::to_uint instead of String::to_uint in ProcFS --- Kernel/GlobalProcessExposed.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Kernel/GlobalProcessExposed.cpp b/Kernel/GlobalProcessExposed.cpp index 5e21e29bea..10c3c19f15 100644 --- a/Kernel/GlobalProcessExposed.cpp +++ b/Kernel/GlobalProcessExposed.cpp @@ -973,8 +973,7 @@ ErrorOr> ProcFSRootDirectory::lookup(Strin return maybe_candidate.release_value(); } - String process_directory_name = name; - auto pid = process_directory_name.to_uint(); + auto pid = name.to_uint(); if (!pid.has_value()) return ESRCH; auto actual_pid = pid.value();