Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/marvell fix off by one.



details:   https://anonhg.NetBSD.org/src/rev/e765e5e5d7e0
branches:  trunk
changeset: 350445:e765e5e5d7e0
user:      maya <maya%NetBSD.org@localhost>
date:      Wed Jan 11 19:32:25 2017 +0000

description:
fix off by one.

ok riastradh

diffstat:

 sys/arch/arm/marvell/armadaxp.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r bdf97bf350a8 -r e765e5e5d7e0 sys/arch/arm/marvell/armadaxp.c
--- a/sys/arch/arm/marvell/armadaxp.c   Wed Jan 11 18:32:48 2017 +0000
+++ b/sys/arch/arm/marvell/armadaxp.c   Wed Jan 11 19:32:25 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: armadaxp.c,v 1.16 2017/01/07 16:19:28 kiyohara Exp $   */
+/*     $NetBSD: armadaxp.c,v 1.17 2017/01/11 19:32:25 maya Exp $       */
 /*******************************************************************************
 Copyright (C) Marvell International Ltd. and its affiliates
 
@@ -37,7 +37,7 @@
 *******************************************************************************/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: armadaxp.c,v 1.16 2017/01/07 16:19:28 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: armadaxp.c,v 1.17 2017/01/11 19:32:25 maya Exp $");
 
 #define _INTR_PRIVATE
 
@@ -665,7 +665,7 @@
 static void
 armadaxp_pic_source_name(struct pic_softc *pic, int irq, char *buf, size_t len)
 {
-       if (irq > __arraycount(armadaxp_pic_source_names)) {
+       if (irq >= __arraycount(armadaxp_pic_source_names)) {
                snprintf(buf, len, "Unknown IRQ %d", irq);
                return;
        }



Home | Main Index | Thread Index | Old Index