From 8a0eba7c03f7bb4f52d62d8d79b6c337e5037417 Mon Sep 17 00:00:00 2001 From: Gabriel Ferreira Date: Sat, 29 Oct 2022 00:58:53 -0300 Subject: [PATCH] core: fix nullptr comparison in system-path.cc --- src/core/model/system-path.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/model/system-path.cc b/src/core/model/system-path.cc index ae34acca2..b3a64d777 100644 --- a/src/core/model/system-path.cc +++ b/src/core/model/system-path.cc @@ -318,10 +318,10 @@ MakeTemporaryDirectoryName() char* path = nullptr; path = std::getenv("TMP"); - if (!path || std::strlen(path) == 0) + if (!path || std::strlen(path) == 0) { path = std::getenv("TEMP"); - if (path || std::strlen(path) == 0) + if (!path || std::strlen(path) == 0) { path = const_cast("/tmp"); }