Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Use __arraycount. No functional change.
details: https://anonhg.NetBSD.org/src/rev/fb03f03154cf
branches: trunk
changeset: 347558:fb03f03154cf
user: skrll <skrll%NetBSD.org@localhost>
date: Sat Sep 03 07:14:19 2016 +0000
description:
Use __arraycount. No functional change.
diffstat:
sys/dev/usb/usb_subr.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 926776a56709 -r fb03f03154cf sys/dev/usb/usb_subr.c
--- a/sys/dev/usb/usb_subr.c Sat Sep 03 06:00:32 2016 +0000
+++ b/sys/dev/usb/usb_subr.c Sat Sep 03 07:14:19 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: usb_subr.c,v 1.211 2016/05/02 11:55:21 skrll Exp $ */
+/* $NetBSD: usb_subr.c,v 1.212 2016/09/03 07:14:19 skrll Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */
/*
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.211 2016/05/02 11:55:21 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.212 2016/09/03 07:14:19 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -1542,7 +1542,7 @@
if (dev->ud_hub) {
for (i = 0;
- i < sizeof(di->udi_ports) / sizeof(di->udi_ports[0]) &&
+ i < __arraycount(di->udi_ports) &&
i < dev->ud_hub->uh_hubdesc.bNbrPorts;
i++) {
p = &dev->ud_hub->uh_ports[i];
@@ -1617,7 +1617,7 @@
if (dev->ud_hub) {
for (i = 0;
- i < sizeof(di->udi_ports) / sizeof(di->udi_ports[0]) &&
+ i < __arraycount(di->udi_ports) &&
i < dev->ud_hub->uh_hubdesc.bNbrPorts;
i++) {
p = &dev->ud_hub->uh_ports[i];
Home |
Main Index |
Thread Index |
Old Index