Переглянути джерело

Kernel: Use StringView::to_uint instead of String::to_uint in ProcFS

Idan Horowitz 3 роки тому
батько
коміт
792b8ca13c
1 змінених файлів з 1 додано та 2 видалено
  1. 1 2
      Kernel/GlobalProcessExposed.cpp

+ 1 - 2
Kernel/GlobalProcessExposed.cpp

@@ -973,8 +973,7 @@ ErrorOr<NonnullRefPtr<ProcFSExposedComponent>> ProcFSRootDirectory::lookup(Strin
         return maybe_candidate.release_value();
     }
 
-    String process_directory_name = name;
-    auto pid = process_directory_name.to_uint<unsigned>();
+    auto pid = name.to_uint<unsigned>();
     if (!pid.has_value())
         return ESRCH;
     auto actual_pid = pid.value();