Module Name:    src
Committed By:   maya
Date:           Wed Jan 11 19:32:25 UTC 2017

Modified Files:
        src/sys/arch/arm/marvell: armadaxp.c

Log Message:
fix off by one.

ok riastradh


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/marvell/armadaxp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/marvell/armadaxp.c
diff -u src/sys/arch/arm/marvell/armadaxp.c:1.16 src/sys/arch/arm/marvell/armadaxp.c:1.17
--- src/sys/arch/arm/marvell/armadaxp.c:1.16	Sat Jan  7 16:19:28 2017
+++ src/sys/arch/arm/marvell/armadaxp.c	Wed Jan 11 19:32:25 2017
@@ -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 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
 *******************************************************************************/
 
 #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 @@ armadaxp_pic_set_priority(struct pic_sof
 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;
 	}

Reply via email to