From c33766f039c5935d33fe6897f215081a08727b5b Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 10 Jul 2019 15:32:07 +0200 Subject: [PATCH] LibCore: Tweak slightly-off error message in CProcessStatisticsReader. --- Libraries/LibCore/CProcessStatisticsReader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Libraries/LibCore/CProcessStatisticsReader.cpp b/Libraries/LibCore/CProcessStatisticsReader.cpp index 30da9a1f53..cb0a7f4e46 100644 --- a/Libraries/LibCore/CProcessStatisticsReader.cpp +++ b/Libraries/LibCore/CProcessStatisticsReader.cpp @@ -10,14 +10,14 @@ HashMap CProcessStatisticsReader::s_usernames; HashMap CProcessStatisticsReader::get_all() { - HashMap 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 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) {