summaryrefslogtreecommitdiff
path: root/lib_m68k
diff options
context:
space:
mode:
authorGraeme Russ <graeme.russ@gmail.com>2008-12-08 20:04:51 +1100
committerWolfgang Denk <wd@denx.de>2009-01-24 01:19:23 +0100
commit626d07348e5f9f302f4ea182161a89f7362a0488 (patch)
tree80aeea3427041a6f5567ba093317ba3c90ed38a0 /lib_m68k
parenta5989c42ae5e295f274a795c426c47819bbdbfda (diff)
Fixed off-by-one errors in lib_m68k/interrupts.c
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
Diffstat (limited to 'lib_m68k')
-rw-r--r--lib_m68k/interrupts.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib_m68k/interrupts.c b/lib_m68k/interrupts.c
index 2dc079beea7..133494f6dcc 100644
--- a/lib_m68k/interrupts.c
+++ b/lib_m68k/interrupts.c
@@ -61,7 +61,7 @@ static __inline__ void set_sr (unsigned short sr)
*/
void irq_install_handler (int vec, interrupt_handler_t * handler, void *arg)
{
- if ((vec < 0) || (vec > NR_IRQS)) {
+ if ((vec < 0) || (vec >= NR_IRQS)) {
printf ("irq_install_handler: wrong interrupt vector %d\n",
vec);
return;
@@ -73,7 +73,7 @@ void irq_install_handler (int vec, interrupt_handler_t * handler, void *arg)
void irq_free_handler (int vec)
{
- if ((vec < 0) || (vec > NR_IRQS)) {
+ if ((vec < 0) || (vec >= NR_IRQS)) {
return;
}