mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-24 11:41:58 +00:00
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:
parent
0be57355f9
commit
3ef80ba5f5
1 changed files with 1 additions and 7 deletions
|
@ -16,11 +16,5 @@ p9getenv(char *s)
|
||||||
int
|
int
|
||||||
p9putenv(char *s, char *v)
|
p9putenv(char *s, char *v)
|
||||||
{
|
{
|
||||||
char *t;
|
return setenv(s, v, 1);
|
||||||
|
|
||||||
t = smprint("%s=%s", s, v);
|
|
||||||
if(t == nil)
|
|
||||||
return -1;
|
|
||||||
putenv(t);
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue