From 870bf849648c34ca8fee363dde44bd3f67179ccc Mon Sep 17 00:00:00 2001 From: Eziotao Date: Thu, 13 Apr 2023 17:47:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E6=A0=87=E8=B6=8A=E7=95=8C=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E6=9C=89=E8=AF=AF=EF=BC=88interrupt.c=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/allwinner_tina/libcpu/interrupt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bsp/allwinner_tina/libcpu/interrupt.c b/bsp/allwinner_tina/libcpu/interrupt.c index 7c4e5cda1b..c41b447b5a 100644 --- a/bsp/allwinner_tina/libcpu/interrupt.c +++ b/bsp/allwinner_tina/libcpu/interrupt.c @@ -70,7 +70,7 @@ void rt_hw_interrupt_init(void) void rt_hw_interrupt_mask(int vector) { int index; - if ((vector < 0) || (vector > INTERRUPTS_MAX)) + if ((vector < 0) || (vector >= INTERRUPTS_MAX)) { return; } @@ -89,7 +89,7 @@ void rt_hw_interrupt_mask(int vector) void rt_hw_interrupt_umask(int vector) { int index; - if ((vector < 0) || (vector > INTERRUPTS_MAX)) + if ((vector < 0) || (vector >= INTERRUPTS_MAX)) { return; } @@ -114,7 +114,7 @@ rt_isr_handler_t rt_hw_interrupt_install(int vector, rt_isr_handler_t handler, rt_isr_handler_t old_handler = RT_NULL; int index; - if ((vector < 0) || (vector > INTERRUPTS_MAX)) + if ((vector < 0) || (vector >= INTERRUPTS_MAX)) { return old_handler; }