Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern don't cast void * in c.
details: https://anonhg.NetBSD.org/src/rev/6373a64706b2
branches: trunk
changeset: 330477:6373a64706b2
user: christos <christos%NetBSD.org@localhost>
date: Thu Jul 10 21:13:52 2014 +0000
description:
don't cast void * in c.
diffstat:
sys/kern/subr_extent.c | 6 +++---
sys/kern/subr_prof.c | 6 +++---
sys/kern/sys_module.c | 6 +++---
3 files changed, 9 insertions(+), 9 deletions(-)
diffs (81 lines):
diff -r 490591b61b0a -r 6373a64706b2 sys/kern/subr_extent.c
--- a/sys/kern/subr_extent.c Thu Jul 10 21:06:20 2014 +0000
+++ b/sys/kern/subr_extent.c Thu Jul 10 21:13:52 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_extent.c,v 1.75 2012/01/29 11:14:49 para Exp $ */
+/* $NetBSD: subr_extent.c,v 1.76 2014/07/10 21:13:52 christos Exp $ */
/*-
* Copyright (c) 1996, 1998, 2007 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_extent.c,v 1.75 2012/01/29 11:14:49 para Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_extent.c,v 1.76 2014/07/10 21:13:52 christos Exp $");
#ifdef _KERNEL
#include "opt_lockdebug.h"
@@ -283,7 +283,7 @@
LIST_INSERT_HEAD(&fex->fex_freelist, rp, er_link);
}
} else {
- ex = (struct extent *)kmem_alloc(sizeof(struct extent),
+ ex = kmem_alloc(sizeof(*ex),
(flags & EX_WAITOK) ? KM_SLEEP : KM_NOSLEEP);
if (ex == NULL)
return (NULL);
diff -r 490591b61b0a -r 6373a64706b2 sys/kern/subr_prof.c
--- a/sys/kern/subr_prof.c Thu Jul 10 21:06:20 2014 +0000
+++ b/sys/kern/subr_prof.c Thu Jul 10 21:13:52 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_prof.c,v 1.46 2014/02/25 18:30:11 pooka Exp $ */
+/* $NetBSD: subr_prof.c,v 1.47 2014/07/10 21:13:52 christos Exp $ */
/*-
* Copyright (c) 1982, 1986, 1993
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_prof.c,v 1.46 2014/02/25 18:30:11 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_prof.c,v 1.47 2014/07/10 21:13:52 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -86,7 +86,7 @@
else if (p->tolimit > MAXARCS)
p->tolimit = MAXARCS;
p->tossize = p->tolimit * sizeof(struct tostruct);
- cp = (char *)malloc(p->kcountsize + p->fromssize + p->tossize,
+ cp = malloc(p->kcountsize + p->fromssize + p->tossize,
M_GPROF, M_NOWAIT | M_ZERO);
if (cp == 0) {
printf("No memory for profiling.\n");
diff -r 490591b61b0a -r 6373a64706b2 sys/kern/sys_module.c
--- a/sys/kern/sys_module.c Thu Jul 10 21:06:20 2014 +0000
+++ b/sys/kern/sys_module.c Thu Jul 10 21:13:52 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sys_module.c,v 1.16 2014/07/10 19:21:46 maxv Exp $ */
+/* $NetBSD: sys_module.c,v 1.17 2014/07/10 21:13:52 christos Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_module.c,v 1.16 2014/07/10 19:21:46 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_module.c,v 1.17 2014/07/10 21:13:52 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -77,7 +77,7 @@
}
propslen = ml->ml_propslen + 1;
- props = (char *)kmem_alloc(propslen, KM_SLEEP);
+ props = kmem_alloc(propslen, KM_SLEEP);
if (props == NULL) {
error = ENOMEM;
goto out1;
Home |
Main Index |
Thread Index |
Old Index