From 590e603997de5c3a96bfd5311fc5c04fac7bc90d Mon Sep 17 00:00:00 2001 From: codlearner Date: Wed, 12 Apr 2023 10:58:30 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=BB=E8=BE=91=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libcpu/sparc-v8/bm3803/interrupt.c | 2 +- libcpu/ti-dsp/c6x/interrupt.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libcpu/sparc-v8/bm3803/interrupt.c b/libcpu/sparc-v8/bm3803/interrupt.c index b3625862b4..45113266ef 100644 --- a/libcpu/sparc-v8/bm3803/interrupt.c +++ b/libcpu/sparc-v8/bm3803/interrupt.c @@ -72,7 +72,7 @@ rt_isr_handler_t rt_hw_interrupt_install(int vector, rt_isr_handler_t handler, { rt_isr_handler_t old_handler = RT_NULL; - if (vector < MAX_HANDLERS || vector >= 0) + if (vector < MAX_HANDLERS && vector >= 0) { old_handler = isr_table[vector].handler; diff --git a/libcpu/ti-dsp/c6x/interrupt.c b/libcpu/ti-dsp/c6x/interrupt.c index 6e48cb8efa..e0f938a4c6 100644 --- a/libcpu/ti-dsp/c6x/interrupt.c +++ b/libcpu/ti-dsp/c6x/interrupt.c @@ -78,7 +78,7 @@ rt_isr_handler_t rt_hw_interrupt_install(int vector, rt_isr_handler_t handler, { rt_isr_handler_t old_handler = RT_NULL; - if (vector < MAX_HANDLERS || vector >= 0) + if (vector < MAX_HANDLERS && vector >= 0) { old_handler = isr_table[vector].handler;