diff --git a/src/system/memory/non-windows.cpp b/src/system/memory/non-windows.cpp index 4e200db..e579fce 100644 --- a/src/system/memory/non-windows.cpp +++ b/src/system/memory/non-windows.cpp @@ -22,12 +22,12 @@ iware::system::memory_t iware::system::memory() noexcept { std::ifstream meminfo("/proc/meminfo"); if(!meminfo.is_open() || !meminfo) - return ret; + return {}; iware::system::memory_t ret; for(std::string line; std::getline(meminfo, line);) { const auto colon_id = line.find_first_of(':'); - const auto value = std::strtoul(line.c_str() + colon_id + 1, nullptr) * 1024; + const auto value = std::strtoul(line.c_str() + colon_id + 1, nullptr, 10) * 1024; if(line.find("MemTotal") == 0) ret.physical_total = value;