Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern constify
details: https://anonhg.NetBSD.org/src/rev/11b396ca430b
branches: trunk
changeset: 748080:11b396ca430b
user: yamt <yamt%NetBSD.org@localhost>
date: Mon Oct 12 23:36:02 2009 +0000
description:
constify
diffstat:
sys/kern/subr_kmem.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (44 lines):
diff -r 0cc1712c6329 -r 11b396ca430b sys/kern/subr_kmem.c
--- a/sys/kern/subr_kmem.c Mon Oct 12 23:35:09 2009 +0000
+++ b/sys/kern/subr_kmem.c Mon Oct 12 23:36:02 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_kmem.c,v 1.29 2009/10/12 23:35:09 yamt Exp $ */
+/* $NetBSD: subr_kmem.c,v 1.30 2009/10/12 23:36:02 yamt Exp $ */
/*-
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_kmem.c,v 1.29 2009/10/12 23:35:09 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_kmem.c,v 1.30 2009/10/12 23:36:02 yamt Exp $");
#include <sys/param.h>
#include <sys/callback.h>
@@ -126,7 +126,7 @@
#if defined(KMEM_SIZE)
#define SIZE_SIZE (max(KMEM_QUANTUM_SIZE, sizeof(size_t)))
static void kmem_size_set(void *, size_t);
-static void kmem_size_check(void *, size_t);
+static void kmem_size_check(const void *, size_t);
#else
#define SIZE_SIZE 0
#define kmem_size_set(p, sz) /* nothing */
@@ -447,14 +447,14 @@
}
static void
-kmem_size_check(void *p, size_t sz)
+kmem_size_check(const void *p, size_t sz)
{
size_t psz;
memcpy(&psz, p, sizeof(psz));
if (psz != sz) {
panic("kmem_free(%p, %zu) != allocated size %zu",
- (uint8_t*)p + SIZE_SIZE, sz - SIZE_SIZE, psz);
+ (const uint8_t *)p + SIZE_SIZE, sz - SIZE_SIZE, psz);
}
}
#endif /* defined(KMEM_SIZE) */
Home |
Main Index |
Thread Index |
Old Index