diff options
-rw-r--r-- | src/lib/libc/stdlib/setenv.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libc/stdlib/setenv.c b/src/lib/libc/stdlib/setenv.c index 242830d7b9..2e882cdbe6 100644 --- a/src/lib/libc/stdlib/setenv.c +++ b/src/lib/libc/stdlib/setenv.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: setenv.c,v 1.10 2009/06/03 15:52:16 millert Exp $ */ | 1 | /* $OpenBSD: setenv.c,v 1.11 2009/06/04 20:39:13 millert Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1987 Regents of the University of California. | 3 | * Copyright (c) 1987 Regents of the University of California. |
4 | * All rights reserved. | 4 | * All rights reserved. |
@@ -101,11 +101,13 @@ setenv(const char *name, const char *value, int rewrite) | |||
101 | if ((C = __findenv(name, (int)(np - name), &offset)) != NULL) { | 101 | if ((C = __findenv(name, (int)(np - name), &offset)) != NULL) { |
102 | if (!rewrite) | 102 | if (!rewrite) |
103 | return (0); | 103 | return (0); |
104 | #if 0 /* XXX - existing entry may not be writable */ | ||
104 | if (strlen(C) >= l_value) { /* old larger; copy over */ | 105 | if (strlen(C) >= l_value) { /* old larger; copy over */ |
105 | while ((*C++ = *value++)) | 106 | while ((*C++ = *value++)) |
106 | ; | 107 | ; |
107 | return (0); | 108 | return (0); |
108 | } | 109 | } |
110 | #endif | ||
109 | } else { /* create new slot */ | 111 | } else { /* create new slot */ |
110 | size_t cnt; | 112 | size_t cnt; |
111 | char **P; | 113 | char **P; |