2
0
mirror of https://github.com/meganz/MEGAcmd synced 2025-08-29 12:57:44 +00:00

Use the correct type for storing getenv's return value.

This commit is contained in:
Vibhav Pant 2023-11-29 14:24:30 +05:30
parent 848108f5ff
commit f31cb3555b
No known key found for this signature in database
GPG Key ID: 0DA2B55215EC37E5

View File

@ -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;