Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/stdio don't cast malloc
details: https://anonhg.NetBSD.org/src/rev/b67db2ec3e2f
branches: trunk
changeset: 786902:b67db2ec3e2f
user: christos <christos%NetBSD.org@localhost>
date: Sun May 19 21:45:00 2013 +0000
description:
don't cast malloc
diffstat:
lib/libc/stdio/vasprintf.c | 6 +++---
lib/libc/stdio/vswprintf.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diffs (54 lines):
diff -r c58b70e5f2d6 -r b67db2ec3e2f lib/libc/stdio/vasprintf.c
--- a/lib/libc/stdio/vasprintf.c Sun May 19 20:50:02 2013 +0000
+++ b/lib/libc/stdio/vasprintf.c Sun May 19 21:45:00 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vasprintf.c,v 1.16 2013/05/17 12:55:57 joerg Exp $ */
+/* $NetBSD: vasprintf.c,v 1.17 2013/05/19 21:45:00 christos Exp $ */
/*
* Copyright (c) 1997 Todd C. Miller <Todd.Miller%courtesan.com@localhost>
@@ -29,7 +29,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: vasprintf.c,v 1.16 2013/05/17 12:55:57 joerg Exp $");
+__RCSID("$NetBSD: vasprintf.c,v 1.17 2013/05/19 21:45:00 christos Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
@@ -63,7 +63,7 @@
_FILEEXT_SETUP(&f, &fext);
f._file = -1;
f._flags = __SWR | __SSTR | __SALC;
- f._bf._base = f._p = (unsigned char *)malloc(128);
+ f._bf._base = f._p = malloc(128);
if (f._bf._base == NULL)
goto err;
f._bf._size = f._w = 127; /* Leave room for the NUL */
diff -r c58b70e5f2d6 -r b67db2ec3e2f lib/libc/stdio/vswprintf.c
--- a/lib/libc/stdio/vswprintf.c Sun May 19 20:50:02 2013 +0000
+++ b/lib/libc/stdio/vswprintf.c Sun May 19 21:45:00 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vswprintf.c,v 1.5 2013/05/17 12:55:57 joerg Exp $ */
+/* $NetBSD: vswprintf.c,v 1.6 2013/05/19 21:45:00 christos Exp $ */
/*
* Copyright (c) 1997 Todd C. Miller <Todd.Miller%courtesan.com@localhost>
@@ -32,7 +32,7 @@
#if 0
__FBSDID("$FreeBSD: src/lib/libc/stdio/vswprintf.c,v 1.6 2005/02/21 19:41:44 fjoe Exp $");
#else
-__RCSID("$NetBSD: vswprintf.c,v 1.5 2013/05/17 12:55:57 joerg Exp $");
+__RCSID("$NetBSD: vswprintf.c,v 1.6 2013/05/19 21:45:00 christos Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -70,7 +70,7 @@
_FILEEXT_SETUP(&f, &fext);
f._file = -1;
f._flags = __SWR | __SSTR | __SALC;
- f._bf._base = f._p = (unsigned char *)malloc(128);
+ f._bf._base = f._p = malloc(128);
if (f._bf._base == NULL) {
errno = ENOMEM;
return -1;
Home |
Main Index |
Thread Index |
Old Index