summaryrefslogtreecommitdiff
path: root/sys/kern/kern_malloc.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2014-11-06 03:20:37 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2014-11-06 03:20:37 +0000
commit67e89a09bf38eaafac903238a5a0b3fa661a763a (patch)
tree1fa30d24b0c3fefdb03b2c35233d2999ab38769a /sys/kern/kern_malloc.c
parent1c8f30c7775f0445adf9e7b567434a48079c12df (diff)
let ramdisks compile
Diffstat (limited to 'sys/kern/kern_malloc.c')
-rw-r--r--sys/kern/kern_malloc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c
index eb400a2d9e5..2dc05ed917d 100644
--- a/sys/kern/kern_malloc.c
+++ b/sys/kern/kern_malloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_malloc.c,v 1.121 2014/11/05 22:27:40 tedu Exp $ */
+/* $OpenBSD: kern_malloc.c,v 1.122 2014/11/06 03:20:36 deraadt Exp $ */
/* $NetBSD: kern_malloc.c,v 1.15.4.2 1996/06/13 17:10:56 cgd Exp $ */
/*
@@ -572,7 +572,10 @@ sysctl_malloc(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
size_t newlen, struct proc *p)
{
struct kmembuckets kb;
- int error, i, siz;
+#if defined(KMEMSTATS) || defined(DIAGNOSTIC) || defined(FFS_SOFTUPDATES)
+ int error;
+#endif
+ int i, siz;
if (namelen != 2 && name[0] != KERN_MALLOC_BUCKETS &&
name[0] != KERN_MALLOC_KMEMNAMES)