don't cast void * in c.

This commit is contained in:
christos 2014-07-10 21:13:52 +00:00
parent 698f62dfb8
commit e65c85be95
3 changed files with 9 additions and 9 deletions

View File

@ -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 @@ extent_create(const char *name, u_long start, u_long end,
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);

View File

@ -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 @@ kmstartup(void)
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");

View File

@ -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 @@ handle_modctl_load(modctl_load_t *ml)
}
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;