summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/setenv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/stdlib/setenv.c')
-rw-r--r--src/lib/libc/stdlib/setenv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libc/stdlib/setenv.c b/src/lib/libc/stdlib/setenv.c
index 60c2cd46a6..15c550ba30 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.18 2016/04/25 21:36:04 millert Exp $ */ 1/* $OpenBSD: setenv.c,v 1.19 2016/09/21 04:38:56 guenther 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.
@@ -141,7 +141,7 @@ setenv(const char *name, const char *value, int rewrite)
141 environ[cnt + 1] = NULL; 141 environ[cnt + 1] = NULL;
142 } 142 }
143 if (!(environ[offset] = /* name + `=' + value */ 143 if (!(environ[offset] = /* name + `=' + value */
144 malloc((size_t)((int)(np - name) + l_value + 2)))) 144 malloc((int)(np - name) + l_value + 2)))
145 return (-1); 145 return (-1);
146 for (C = environ[offset]; (*C = *name++) && *C != '='; ++C) 146 for (C = environ[offset]; (*C = *name++) && *C != '='; ++C)
147 ; 147 ;