summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/setenv.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2016-09-21 04:38:56 +0000
committerguenther <guenther@openbsd.org>2016-09-21 04:38:56 +0000
commit3240e6a8f93e9dcb3b95e7fafb9e2b27f13c7c9d (patch)
tree7368a30a463d94567dfeaa9177978c7039ebf249 /lib/libc/stdlib/setenv.c
parentsync (diff)
downloadwireguard-openbsd-3240e6a8f93e9dcb3b95e7fafb9e2b27f13c7c9d.tar.xz
wireguard-openbsd-3240e6a8f93e9dcb3b95e7fafb9e2b27f13c7c9d.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 'lib/libc/stdlib/setenv.c')
-rw-r--r--lib/libc/stdlib/setenv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdlib/setenv.c b/lib/libc/stdlib/setenv.c
index 60c2cd46a65..15c550ba30b 100644
--- a/lib/libc/stdlib/setenv.c
+++ b/lib/libc/stdlib/setenv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: setenv.c,v 1.18 2016/04/25 21:36:04 millert Exp $ */
+/* $OpenBSD: setenv.c,v 1.19 2016/09/21 04:38:56 guenther Exp $ */
/*
* Copyright (c) 1987 Regents of the University of California.
* All rights reserved.
@@ -141,7 +141,7 @@ setenv(const char *name, const char *value, int rewrite)
environ[cnt + 1] = NULL;
}
if (!(environ[offset] = /* name + `=' + value */
- malloc((size_t)((int)(np - name) + l_value + 2))))
+ malloc((int)(np - name) + l_value + 2)))
return (-1);
for (C = environ[offset]; (*C = *name++) && *C != '='; ++C)
;