mirror of
https://github.com/meganz/MEGAcmd
synced 2025-08-29 04:47:42 +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)
|
TestInstrumentsEnvVarGuard(std::string variable, const std::string &value)
|
||||||
: mVar(std::move(variable)), mHasInitValue(false), mInitValue()
|
: mVar(std::move(variable)), mHasInitValue(false), mInitValue()
|
||||||
{
|
{
|
||||||
char *initValue = getenv(mVar.c_str());
|
const char *initValue = getenv(mVar.c_str());
|
||||||
if (initValue != nullptr)
|
if (initValue != nullptr)
|
||||||
{
|
{
|
||||||
mHasInitValue = true;
|
mHasInitValue = true;
|
||||||
@ -349,7 +349,7 @@ protected:
|
|||||||
explicit TestInstrumentsEnvVarGuard(std::string variable)
|
explicit TestInstrumentsEnvVarGuard(std::string variable)
|
||||||
: mVar(std::move(variable)), mHasInitValue(false), mInitValue()
|
: mVar(std::move(variable)), mHasInitValue(false), mInitValue()
|
||||||
{
|
{
|
||||||
char *initValue = getenv(mVar.c_str());
|
const char *initValue = getenv(mVar.c_str());
|
||||||
if (initValue != nullptr)
|
if (initValue != nullptr)
|
||||||
{
|
{
|
||||||
mHasInitValue = true;
|
mHasInitValue = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user