pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/posix_headers/files typecast return value fro...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/990f3528b3f5
branches:  trunk
changeset: 528309:990f3528b3f5
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Sat Apr 28 21:25:06 2007 +0000

description:
typecast return value from malloc

diffstat:

 pkgtools/posix_headers/files/stdlib.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r f9692e0496ce -r 990f3528b3f5 pkgtools/posix_headers/files/stdlib.h
--- a/pkgtools/posix_headers/files/stdlib.h     Sat Apr 28 21:03:56 2007 +0000
+++ b/pkgtools/posix_headers/files/stdlib.h     Sat Apr 28 21:25:06 2007 +0000
@@ -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 @@
        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);



Home | Main Index | Thread Index | Old Index