mirror of
https://github.com/meganz/MEGAcmd
synced 2025-08-28 20:37:40 +00:00
Use the correct type for storing getenv's return value.
This commit is contained in:
parent
848108f5ff
commit
f31cb3555b
@ -310,7 +310,7 @@ public:
|
||||
TestInstrumentsEnvVarGuard(std::string variable, const std::string &value)
|
||||
: mVar(std::move(variable)), mHasInitValue(false), mInitValue()
|
||||
{
|
||||
char *initValue = getenv(mVar.c_str());
|
||||
const char *initValue = getenv(mVar.c_str());
|
||||
if (initValue != nullptr)
|
||||
{
|
||||
mHasInitValue = true;
|
||||
@ -349,7 +349,7 @@ protected:
|
||||
explicit TestInstrumentsEnvVarGuard(std::string variable)
|
||||
: mVar(std::move(variable)), mHasInitValue(false), mInitValue()
|
||||
{
|
||||
char *initValue = getenv(mVar.c_str());
|
||||
const char *initValue = getenv(mVar.c_str());
|
||||
if (initValue != nullptr)
|
||||
{
|
||||
mHasInitValue = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user