Commit d3c1578c authored by Benjamin Beurdouche's avatar Benjamin Beurdouche

Bug 1685880 - Minor fix to prevent unused variable on early return. r=beurdouche

Depends on D104418

Differential Revision: https://phabricator.services.mozilla.com/D106144

--HG--
extra : moz-landing-system : lando
parent 49dd1c6f
......@@ -730,8 +730,6 @@ int
NSS_PutEnv(const char *envVarName, const char *envValue)
{
SECStatus result = SECSuccess;
char *encoded;
int putEnvFailed;
#ifdef _WIN32
PRBool setOK;
......@@ -748,14 +746,14 @@ NSS_PutEnv(const char *envVarName, const char *envValue)
return SECFailure;
}
#else
encoded = (char *)PORT_ZAlloc(strlen(envVarName) + 2 + strlen(envValue));
char *encoded = (char *)PORT_ZAlloc(strlen(envVarName) + 2 + strlen(envValue));
if (!encoded) {
return SECFailure;
}
strcpy(encoded, envVarName);
strcat(encoded, "=");
strcat(encoded, envValue);
putEnvFailed = putenv(encoded); /* adopt. */
int putEnvFailed = putenv(encoded); /* adopt. */
if (putEnvFailed) {
SET_ERROR_CODE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment