diff options
Diffstat (limited to 'lib/libc/stdlib/getenv.c')
-rw-r--r-- | lib/libc/stdlib/getenv.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libc/stdlib/getenv.c b/lib/libc/stdlib/getenv.c index 079b024..8451103 100644 --- a/lib/libc/stdlib/getenv.c +++ b/lib/libc/stdlib/getenv.c @@ -506,8 +506,7 @@ __setenv(const char *name, size_t nameLen, const char *value, int overwrite) /* Save name of name/value pair. */ env = stpncpy(envVars[envNdx].name, name, nameLen); - if ((envVars[envNdx].name)[nameLen] != '=') - env = stpcpy(env, "="); + *env++ = '='; } else env = envVars[envNdx].value; |