From ea6363c5400779fd723844d38558beaf3267f0b5 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 10 Jul 2019 15:15:10 +0200 Subject: [PATCH] top: Remove some unused code. --- Userland/top.cpp | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/Userland/top.cpp b/Userland/top.cpp index f78486c0f9..9ddf700a73 100644 --- a/Userland/top.cpp +++ b/Userland/top.cpp @@ -5,16 +5,12 @@ #include #include #include -#include #include #include -#include #include #include #include -static HashMap* s_usernames; - struct ProcessData { CProcessStatistics stats; unsigned nsched_since_prev { 0 }; @@ -29,12 +25,6 @@ struct Snapshot { static Snapshot get_snapshot() { - CFile file("/proc/all"); - if (!file.open(CIODevice::ReadOnly)) { - fprintf(stderr, "Failed to open /proc/all: %s\n", file.error_string()); - exit(1); - } - Snapshot snapshot; auto all_processes = CProcessStatisticsReader::get_all(); @@ -52,12 +42,6 @@ static Snapshot get_snapshot() int main(int, char**) { - s_usernames = new HashMap(); - setpwent(); - while (auto* passwd = getpwent()) - s_usernames->set(passwd->pw_uid, passwd->pw_name); - endpwent(); - Vector processes; auto prev = get_snapshot(); usleep(10000);