Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/pic Add a KASSERT



details:   https://anonhg.NetBSD.org/src/rev/e056d693b72f
branches:  trunk
changeset: 779991:e056d693b72f
user:      skrll <skrll%NetBSD.org@localhost>
date:      Wed Jul 04 13:34:24 2012 +0000

description:
Add a KASSERT

diffstat:

 sys/arch/arm/pic/pic.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 642acfbf4dae -r e056d693b72f sys/arch/arm/pic/pic.c
--- a/sys/arch/arm/pic/pic.c    Wed Jul 04 11:39:42 2012 +0000
+++ b/sys/arch/arm/pic/pic.c    Wed Jul 04 13:34:24 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pic.c,v 1.8 2011/03/11 03:16:14 bsh Exp $      */
+/*     $NetBSD: pic.c,v 1.9 2012/07/04 13:34:24 skrll Exp $    */
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -28,7 +28,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.8 2011/03/11 03:16:14 bsh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.9 2012/07/04 13:34:24 skrll Exp $");
 
 #define _INTR_PRIVATE
 #include <sys/param.h>
@@ -412,6 +412,7 @@
        printf("%s: pic_sourcebase=%zu pic_maxsources=%zu\n",
            pic->pic_name, pic_sourcebase, pic->pic_maxsources);
 #endif
+       KASSERT(pic->pic_maxsources <= PIC_MAXSOURCES);
        KASSERT(pic_sourcebase + pic->pic_maxsources <= PIC_MAXMAXSOURCES);
 
        pic->pic_sources = &pic_sources[pic_sourcebase];



Home | Main Index | Thread Index | Old Index