summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/setenv.c
diff options
context:
space:
mode:
authorguenther <>2016-09-21 04:38:56 +0000
committerguenther <>2016-09-21 04:38:56 +0000
commit9c39f482053578cd14ef5b179253da998be17454 (patch)
tree3bb42615ccded37cb263d99efa2577aacafc250f /src/lib/libc/stdlib/setenv.c
parent6d139a2f685581fa5f221bba4bc860f16b4af925 (diff)
downloadopenbsd-9c39f482053578cd14ef5b179253da998be17454.tar.gz
openbsd-9c39f482053578cd14ef5b179253da998be17454.tar.bz2
openbsd-9c39f482053578cd14ef5b179253da998be17454.zip
Delete casts to off_t and size_t that are implied by assignments
or prototypes. Ditto for some of the char* and void* casts too. verified no change to instructions on ILP32 (i386) and LP64 (amd64) ok natano@ abluhm@ deraadt@ millert@
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 ;