diff options
| author | codlearner <[email protected]> | 2023-04-12 10:58:30 +0800 |
|---|---|---|
| committer | supperthomas <[email protected]> | 2023-04-13 10:00:23 +0800 |
| commit | 590e603997de5c3a96bfd5311fc5c04fac7bc90d (patch) | |
| tree | 54e4ed8f121172fa9292e487711ff1029ae665a8 /libcpu | |
| parent | 5bbcb5dc799cddc732c1cdc966d8d206e9120986 (diff) | |
逻辑错误
Diffstat (limited to 'libcpu')
| -rw-r--r-- | libcpu/sparc-v8/bm3803/interrupt.c | 2 | ||||
| -rw-r--r-- | 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; |
