From daf0a8fc1fcc8a3560fa575b06fa62a24d837590 Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Mon, 19 Sep 2022 05:01:33 +0800 Subject: [PATCH] params: cleanup constructor (#25834) old-commit-hash: 583304fc7b5970ec5f079720bf6c6aa7ff91ce5a --- common/params.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/common/params.cc b/common/params.cc index 7b2d4490ea..a64c2f133b 100644 --- a/common/params.cc +++ b/common/params.cc @@ -198,10 +198,8 @@ std::unordered_map keys = { Params::Params(const std::string &path) { - const char* env = std::getenv("OPENPILOT_PREFIX"); - prefix = env ? "/" + std::string(env) : "/d"; - std::string default_param_path = ensure_params_path(prefix); - params_path = path.empty() ? default_param_path : ensure_params_path(prefix, path); + prefix = "/" + util::getenv("OPENPILOT_PREFIX", "d"); + params_path = ensure_params_path(prefix, path); } std::vector Params::allKeys() const {