Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Benjamin Beurdouche committed Feb 24, 2021
1 parent 49dd1c6 commit d3c1578
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/util/secport.c
Expand Up @@ -730,8 +730,6 @@ int
NSS_PutEnv(const char *envVarName, const char *envValue)
{
SECStatus result = SECSuccess;
char *encoded;
int putEnvFailed;
#ifdef _WIN32
PRBool setOK;

Expand All @@ -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
Expand Down

0 comments on commit d3c1578

Please sign in to comment.