summaryrefslogtreecommitdiff
path: root/openbsd-compat/setenv.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-02-13 16:00:15 +1100
committerDamien Miller <djm@mindrot.org>2002-02-13 16:00:15 +1100
commit8e3bdca1da7d30542e9028f35f2a1cef052c85e4 (patch)
tree4c05c79248820c0c128db51a2cd2c74220cd66e8 /openbsd-compat/setenv.c
parent3db5f530d0fdf8044d6014ab12940efe0bbecca7 (diff)
- (djm) Sync openbsd-compat with OpenBSD CVS too
Diffstat (limited to 'openbsd-compat/setenv.c')
-rw-r--r--openbsd-compat/setenv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/openbsd-compat/setenv.c b/openbsd-compat/setenv.c
index ac9670baf..6c2d5cd31 100644
--- a/openbsd-compat/setenv.c
+++ b/openbsd-compat/setenv.c
@@ -35,7 +35,7 @@
35#ifndef HAVE_SETENV 35#ifndef HAVE_SETENV
36 36
37#if defined(LIBC_SCCS) && !defined(lint) 37#if defined(LIBC_SCCS) && !defined(lint)
38static char *rcsid = "$OpenBSD: setenv.c,v 1.3 1998/02/02 22:44:53 millert Exp $"; 38static char *rcsid = "$OpenBSD: setenv.c,v 1.4 2001/07/09 06:57:45 deraadt Exp $";
39#endif /* LIBC_SCCS and not lint */ 39#endif /* LIBC_SCCS and not lint */
40 40
41#include <stdlib.h> 41#include <stdlib.h>
@@ -101,7 +101,8 @@ setenv(name, value, rewrite)
101 if (!rewrite) 101 if (!rewrite)
102 return (0); 102 return (0);
103 if (strlen(C) >= l_value) { /* old larger; copy over */ 103 if (strlen(C) >= l_value) { /* old larger; copy over */
104 while ((*C++ = *value++)); 104 while ((*C++ = *value++))
105 ;
105 return (0); 106 return (0);
106 } 107 }
107 } else { /* create new slot */ 108 } else { /* create new slot */