diff options
author | tnn <tnn> | 2007-04-28 21:25:06 +0000 |
---|---|---|
committer | tnn <tnn> | 2007-04-28 21:25:06 +0000 |
commit | 6605dfd6ee47e39cad03a09c019f145f7dfa7768 (patch) | |
tree | aaf4f7c6b635b459ff2886b1f979db88928ea82a /pkgtools/posix_headers | |
parent | 5f80fdbce1e50d77d14f0c4e8032653b41fff779 (diff) | |
download | pkgsrc-6605dfd6ee47e39cad03a09c019f145f7dfa7768.tar.gz |
typecast return value from malloc
Diffstat (limited to 'pkgtools/posix_headers')
-rw-r--r-- | pkgtools/posix_headers/files/stdlib.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgtools/posix_headers/files/stdlib.h b/pkgtools/posix_headers/files/stdlib.h index 49939b6c9f5..edc4fb54cfb 100644 --- a/pkgtools/posix_headers/files/stdlib.h +++ b/pkgtools/posix_headers/files/stdlib.h @@ -1,4 +1,4 @@ -/* $NetBSD: stdlib.h,v 1.1 2007/04/28 21:03:56 tnn Exp $ */ +/* $NetBSD: stdlib.h,v 1.2 2007/04/28 21:25:06 tnn Exp $ */ #ifndef _PKGSRC_STDLIB_H_ #define _PKGSRC_STDLIB_H_ #include "@REAL_HEADER@" @@ -15,7 +15,7 @@ static __inline int setenv(const char *name, const char *value, int overwrite) { char *c; int ret; if (!overwrite && getenv(name)) return(-1); - c = malloc(strlen(name)+strlen(value)+2); + c = (char*)malloc(strlen(name)+strlen(value)+2); if(!c) return(-1); sprintf(c, "%s=%s", name, value); ret = putenv(c); |