diff options
author | Dan Cross <cross@gajendra.net> | 2020-01-16 16:46:58 +0000 |
---|---|---|
committer | Dan Cross <cross@gajendra.net> | 2020-01-16 16:46:58 +0000 |
commit | 3ef80ba5f5c29a8367d32353a9620ec4cf9cb880 (patch) | |
tree | 174600c80deda2899b7174836260902bbd1c86bf /src/lib9 | |
parent | 0be57355f912dbedb76cea1a7a4f9a1deb5bde2b (diff) | |
download | plan9port-3ef80ba5f5c29a8367d32353a9620ec4cf9cb880.tar.gz plan9port-3ef80ba5f5c29a8367d32353a9620ec4cf9cb880.tar.bz2 plan9port-3ef80ba5f5c29a8367d32353a9620ec4cf9cb880.zip |
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>
Diffstat (limited to 'src/lib9')
-rw-r--r-- | src/lib9/getenv.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/lib9/getenv.c b/src/lib9/getenv.c index 384196cf..5dfc8577 100644 --- a/src/lib9/getenv.c +++ b/src/lib9/getenv.c @@ -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); } |