소스 검색

LibCore: Tweak slightly-off error message in CProcessStatisticsReader.

Andreas Kling 6 년 전
부모
커밋
c33766f039
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      Libraries/LibCore/CProcessStatisticsReader.cpp

+ 3 - 3
Libraries/LibCore/CProcessStatisticsReader.cpp

@@ -10,14 +10,14 @@ HashMap<uid_t, String> CProcessStatisticsReader::s_usernames;
 
 HashMap<pid_t, CProcessStatistics> CProcessStatisticsReader::get_all()
 {
-    HashMap<pid_t, CProcessStatistics> map;
-
     CFile file("/proc/all");
     if (!file.open(CIODevice::ReadOnly)) {
-        fprintf(stderr, "CProcessHelper : failed to open /proc/all: %s\n", file.error_string());
+        fprintf(stderr, "CProcessStatisticsReader: Failed to open /proc/all: %s\n", file.error_string());
         return {};
     }
 
+    HashMap<pid_t, CProcessStatistics> map;
+
     auto file_contents = file.read_all();
     auto json = JsonValue::from_string({ file_contents.data(), file_contents.size() });
     json.as_array().for_each([&](auto& value) {