Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Use __arraycount(x), not howmany(sizeof(x), sizeof(...
details: https://anonhg.NetBSD.org/src/rev/5365bc6250bc
branches: trunk
changeset: 343848:5365bc6250bc
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Feb 28 20:24:23 2016 +0000
description:
Use __arraycount(x), not howmany(sizeof(x), sizeof(*x)).
diffstat:
sys/kern/kern_rndq.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 79b87633ff08 -r 5365bc6250bc sys/kern/kern_rndq.c
--- a/sys/kern/kern_rndq.c Sun Feb 28 20:20:17 2016 +0000
+++ b/sys/kern/kern_rndq.c Sun Feb 28 20:24:23 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_rndq.c,v 1.84 2016/02/28 20:20:17 riastradh Exp $ */
+/* $NetBSD: kern_rndq.c,v 1.85 2016/02/28 20:24:23 riastradh Exp $ */
/*-
* Copyright (c) 1997-2013 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.84 2016/02/28 20:20:17 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.85 2016/02/28 20:24:23 riastradh Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -424,7 +424,7 @@
if (RND_ENABLED(cpusrcp)) {
cpu_rng_t buf[2 * RND_ENTROPY_THRESHOLD / sizeof(cpu_rng_t)];
cpu_rng_t *bufp;
- size_t cnt = howmany(sizeof(buf), sizeof(cpu_rng_t));
+ size_t cnt = __arraycount(buf);
size_t entropy = 0;
for (bufp = buf; bufp < buf + cnt; bufp++) {
Home |
Main Index |
Thread Index |
Old Index