From c323ce85c0eaf14d111cdf5ef23b15e276294ea1 Mon Sep 17 00:00:00 2001 From: ache Date: Mon, 30 Apr 2007 03:47:31 +0000 Subject: Remove special case skipping initial '=' of the setenv() value "for compatibility with the different environment conventions" (man page). With the standards, we don't have them different anymore and IEEE Std 1003.1-2001 says that "The values that the environment variables may be assigned are not restricted except that they are considered to end with a null byte" --- lib/libc/stdlib/getenv.3 | 5 ----- lib/libc/stdlib/setenv.c | 2 -- 2 files changed, 7 deletions(-) (limited to 'lib/libc/stdlib') diff --git a/lib/libc/stdlib/getenv.3 b/lib/libc/stdlib/getenv.3 index 35547aa..1882ba2 100644 --- a/lib/libc/stdlib/getenv.3 +++ b/lib/libc/stdlib/getenv.3 @@ -57,11 +57,6 @@ These functions set, unset and fetch environment variables from the host .Em environment list . -For compatibility with differing environment conventions, -the given argument -.Fa value -may be prepended with an equal sign -.Dq Li \&= . .Pp The .Fn getenv diff --git a/lib/libc/stdlib/setenv.c b/lib/libc/stdlib/setenv.c index 4f05f32..2695af7 100644 --- a/lib/libc/stdlib/setenv.c +++ b/lib/libc/stdlib/setenv.c @@ -61,8 +61,6 @@ setenv(name, value, rewrite) return (-1); } - if (*value == '=') /* no `=' in value */ - ++value; l_value = strlen(value); if ((c = __findenv(name, &offset))) { /* find if already exists */ if (!rewrite) -- cgit v1.1