From 1e78a06b840b607b8fcd27b626d8cbd90c0bfc9e Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Fri, 15 Oct 2021 05:23:05 +0800 Subject: [PATCH] HardwarePC::TICI() : use util::getenv (#22532) --- selfdrive/hardware/hw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/hardware/hw.h b/selfdrive/hardware/hw.h index 115b7ff99e..d7a6c8d1d5 100644 --- a/selfdrive/hardware/hw.h +++ b/selfdrive/hardware/hw.h @@ -14,7 +14,7 @@ class HardwarePC : public HardwareNone { public: static std::string get_os_version() { return "openpilot for PC"; } static bool PC() { return true; } - static bool TICI() { const char *tici = getenv("TICI"); return (tici != nullptr) && (strcmp(tici, "1") == 0); } + static bool TICI() { return util::getenv("TICI", 0) == 1; } }; #define Hardware HardwarePC #endif