From 17dfdb2e00b609e3c7e975ce7a7c19da43318b79 Mon Sep 17 00:00:00 2001 From: bd Date: Mon, 10 Mar 2025 22:17:21 -0400 Subject: Remove problematic file-local logger in cli.cc --- src/cli/cli.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/cli/cli.cc') diff --git a/src/cli/cli.cc b/src/cli/cli.cc index e968a42..272c246 100644 --- a/src/cli/cli.cc +++ b/src/cli/cli.cc @@ -5,10 +5,9 @@ #include "response.h" #include -static Logger *global_log = Logger::getInstance(); - Cli::Cli() { + this->cache = nullptr; this->initialize(); commands["l"] = [this](std::vector args) { @@ -176,7 +175,7 @@ void Cli::initialize() { Logger *global_log = Logger::getInstance(); global_log->log(INFO, "Resetting memory configuration."); - if (this->cache == nullptr) + if (this->cache != nullptr) delete this->cache; Dram *d = new Dram(MEM_SIZE, MEM_DELAY); this->cache = new Cache(d, L1_CACHE_DELAY); -- cgit v1.2.3