Commit 626d0734 authored by Graeme Russ's avatar Graeme Russ Committed by Wolfgang Denk

Fixed off-by-one errors in lib_m68k/interrupts.c

Signed-off-by: default avatarGraeme Russ <graeme.russ@gmail.com>
parent a5989c42
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment