Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern intrcnt[] is changed from long to u_int. Use sizeof...
details: https://anonhg.NetBSD.org/src/rev/c0146ef5f817
branches: trunk
changeset: 378503:c0146ef5f817
user: rin <rin%NetBSD.org@localhost>
date: Thu Apr 15 00:37:31 2021 +0000
description:
intrcnt[] is changed from long to u_int. Use sizeof(var) instead of
sizeof(type) to catch up with this change.
No binary changes as all ports with __HAVE_LEGACY_INTRCNT are ILP32, IIUC.
diffstat:
sys/kern/subr_evcnt.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r fe3f37046ea9 -r c0146ef5f817 sys/kern/subr_evcnt.c
--- a/sys/kern/subr_evcnt.c Thu Apr 15 00:32:50 2021 +0000
+++ b/sys/kern/subr_evcnt.c Thu Apr 15 00:37:31 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_evcnt.c,v 1.15 2021/04/02 10:39:22 simonb Exp $ */
+/* $NetBSD: subr_evcnt.c,v 1.16 2021/04/15 00:37:31 rin Exp $ */
/*
* Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_evcnt.c,v 1.15 2021/04/02 10:39:22 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_evcnt.c,v 1.16 2021/04/15 00:37:31 rin Exp $");
#include <sys/param.h>
#include <sys/evcnt.h>
@@ -393,7 +393,7 @@ evcnt_attach_legacy_intrcnt(void)
size_t i;
const char *cp;
- nintr = ((intptr_t)eintrcnt - (intptr_t)intrcnt) / sizeof(long);
+ nintr = ((intptr_t)eintrcnt - (intptr_t)intrcnt) / sizeof(intrcnt[0]);
intr_evcnts = kmem_alloc(sizeof(struct evcnt) * nintr, KM_SLEEP);
for (cp = intrnames, i = 0; i < nintr; i++) {
evcnt_attach_dynamic(&intr_evcnts[i], EVCNT_TYPE_INTR,
Home |
Main Index |
Thread Index |
Old Index