aboutsummaryrefslogtreecommitdiff
path: root/gdb/dbug-rom.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/dbug-rom.c')
-rw-r--r--gdb/dbug-rom.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/dbug-rom.c b/gdb/dbug-rom.c
index 4bcb5a6..f8886d9 100644
--- a/gdb/dbug-rom.c
+++ b/gdb/dbug-rom.c
@@ -90,8 +90,7 @@ dbug_regname (int index)
/* no float registers */
};
- if ((index >= (sizeof (regnames) / sizeof (regnames[0])))
- || (index < 0) || (index >= gdbarch_num_regs (current_gdbarch)))
+ if (index >= ARRAY_SIZE (regnames) || index < 0)
return NULL;
else
return regnames[index];