lib9: putenv wraps POSIX setenv, not legacy putenv

POSIX setenv does everything that p9putenv's body,
so just delegate to that.

Signed-off-by: Dan Cross <cross@gajendra.net>
This commit is contained in:
Dan Cross 2020-01-16 16:46:58 +00:00
parent 0be57355f9
commit 3ef80ba5f5

View file

@ -16,11 +16,5 @@ p9getenv(char *s)
int
p9putenv(char *s, char *v)
{
char *t;
t = smprint("%s=%s", s, v);
if(t == nil)
return -1;
putenv(t);
return 0;
return setenv(s, v, 1);
}