diff options
author | tnn <tnn@pkgsrc.org> | 2007-04-28 21:25:06 +0000 |
---|---|---|
committer | tnn <tnn@pkgsrc.org> | 2007-04-28 21:25:06 +0000 |
commit | 43af8ec6f69dee7fb089bcb0ff7fb0638dcb2149 (patch) | |
tree | aaf4f7c6b635b459ff2886b1f979db88928ea82a /pkgtools/posix_headers | |
parent | 283b5586e12a3e0879e57f00d739321adce6107e (diff) | |
download | pkgsrc-43af8ec6f69dee7fb089bcb0ff7fb0638dcb2149.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); |