mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-01 06:25:34 +00:00
[4062] copy_ -> env_copy_
This commit is contained in:
@@ -57,11 +57,11 @@ namespace {
|
|||||||
class DaemonTest : public ::testing::Test {
|
class DaemonTest : public ::testing::Test {
|
||||||
public:
|
public:
|
||||||
/// @brief Constructor
|
/// @brief Constructor
|
||||||
DaemonTest() : env_(0), copy_() {
|
DaemonTest() : env_(0), env_copy_() {
|
||||||
// Take a copy of KEA_PIDFILE_DIR environment variable value
|
// Take a copy of KEA_PIDFILE_DIR environment variable value
|
||||||
env_ = getenv("KEA_PIDFILE_DIR");
|
env_ = getenv("KEA_PIDFILE_DIR");
|
||||||
if (env_) {
|
if (env_) {
|
||||||
copy_ = std::string(env_);
|
env_copy_ = std::string(env_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -74,8 +74,8 @@ public:
|
|||||||
isc::log::setDefaultLoggingOutput();
|
isc::log::setDefaultLoggingOutput();
|
||||||
// Restore KEA_PIDFILE_DIR environment variable value
|
// Restore KEA_PIDFILE_DIR environment variable value
|
||||||
env_ = getenv("KEA_PIDFILE_DIR");
|
env_ = getenv("KEA_PIDFILE_DIR");
|
||||||
if (!copy_.empty() && (!env_ || !copy_.compare(env_))) {
|
if (!env_copy_.empty() && (!env_ || !env_copy_.compare(env_))) {
|
||||||
setenv("KEA_PIDFILE_DIR", copy_.c_str(), 1);
|
setenv("KEA_PIDFILE_DIR", env_copy_.c_str(), 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,7 +84,7 @@ private:
|
|||||||
char* env_;
|
char* env_;
|
||||||
|
|
||||||
/// @brief copy of KEA_PIDFILE_DIR environment variable value
|
/// @brief copy of KEA_PIDFILE_DIR environment variable value
|
||||||
std::string copy_;
|
std::string env_copy_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user