Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Use sizeof correct type, not pointer to wrong type.
details: https://anonhg.NetBSD.org/src/rev/5d0cfd125406
branches: trunk
changeset: 750272:5d0cfd125406
user: dsl <dsl%NetBSD.org@localhost>
date: Tue Dec 22 20:50:46 2009 +0000
description:
Use sizeof correct type, not pointer to wrong type.
Fixes PR/42498.
This has been wrong since the initial import!
diffstat:
sys/kern/kern_event.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 9cfc2b9d8aaa -r 5d0cfd125406 sys/kern/kern_event.c
--- a/sys/kern/kern_event.c Tue Dec 22 18:55:25 2009 +0000
+++ b/sys/kern/kern_event.c Tue Dec 22 20:50:46 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_event.c,v 1.68 2009/12/20 09:36:05 dsl Exp $ */
+/* $NetBSD: kern_event.c,v 1.69 2009/12/22 20:50:46 dsl Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_event.c,v 1.68 2009/12/20 09:36:05 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_event.c,v 1.69 2009/12/22 20:50:46 dsl Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -318,7 +318,7 @@
if (user_kfilterc + 1 > user_kfiltermaxc) {
/* Grow in KFILTER_EXTENT chunks. */
user_kfiltermaxc += KFILTER_EXTENT;
- len = user_kfiltermaxc * sizeof(struct filter *);
+ len = user_kfiltermaxc * sizeof(*kfilter);
kfilter = kmem_alloc(len, KM_SLEEP);
memset((char *)kfilter + user_kfiltersz, 0, len - user_kfiltersz);
if (user_kfilters != NULL) {
Home |
Main Index |
Thread Index |
Old Index