Browse Source

逻辑错误

codlearner 2 years ago
parent
commit
590e603997
2 changed files with 2 additions and 2 deletions
  1. 1 1
      libcpu/sparc-v8/bm3803/interrupt.c
  2. 1 1
      libcpu/ti-dsp/c6x/interrupt.c

+ 1 - 1
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;
 

+ 1 - 1
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;