Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Incorrect use of pointer arithmetic.
details: https://anonhg.NetBSD.org/src/rev/af2eea8dc3f8
branches: trunk
changeset: 327890:af2eea8dc3f8
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Thu Mar 20 06:48:22 2014 +0000
description:
Incorrect use of pointer arithmetic.
CID 1193195: Extra sizeof expression
diffstat:
sys/kern/subr_vmem.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 49793476f647 -r af2eea8dc3f8 sys/kern/subr_vmem.c
--- a/sys/kern/subr_vmem.c Thu Mar 20 06:18:20 2014 +0000
+++ b/sys/kern/subr_vmem.c Thu Mar 20 06:48:22 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_vmem.c,v 1.89 2014/03/11 20:32:05 pooka Exp $ */
+/* $NetBSD: subr_vmem.c,v 1.90 2014/03/20 06:48:22 mlelstv Exp $ */
/*-
* Copyright (c)2006,2007,2008,2009 YAMAMOTO Takashi,
@@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_vmem.c,v 1.89 2014/03/11 20:32:05 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_vmem.c,v 1.90 2014/03/20 06:48:22 mlelstv Exp $");
#if defined(_KERNEL)
#include "opt_ddb.h"
@@ -324,7 +324,7 @@
LIST_REMOVE(bt, bt_freelist);
vm->vm_nfreetags--;
if (bt >= static_bts
- && bt < static_bts + sizeof(static_bts)) {
+ && bt < &static_bts[STATIC_BT_COUNT]) {
mutex_enter(&vmem_btag_lock);
LIST_INSERT_HEAD(&vmem_btag_freelist, bt, bt_freelist);
vmem_btag_freelist_count++;
Home |
Main Index |
Thread Index |
Old Index