From: Hans-Peter Nilsson Date: Wed, 24 Oct 2001 03:39:54 +0000 (+0000) Subject: * elf32-cris.c (cris_reloc_type_lookup): Change loop to use X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=908d94bfcd7598fb97015ed5a7474a1d26cf56a5;p=binutils-gdb.git * elf32-cris.c (cris_reloc_type_lookup): Change loop to use unsigned, increasing index. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index cd8e4afc8ce..e41c153666e 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2001-10-24 Hans-Peter Nilsson + + * elf32-cris.c (cris_reloc_type_lookup): Change loop to use + unsigned, increasing index. + 2001-10-23 H.J. Lu * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check @@ -43,7 +48,8 @@ 2001-10-21 H.J. Lu - * elf32-cris.c (cris_reloc_type_lookup): Use int for index. + * elf32-cris.c (cris_reloc_type_lookup): Use int for index. Cover + index 0. 2001-10-20 H.J. Lu diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c index afcd397d761..19fa7c46b56 100644 --- a/bfd/elf32-cris.c +++ b/bfd/elf32-cris.c @@ -437,10 +437,9 @@ cris_reloc_type_lookup (abfd, code) bfd * abfd ATTRIBUTE_UNUSED; bfd_reloc_code_real_type code; { - int i; + unsigned int i; - for (i = sizeof (cris_reloc_map) / sizeof (cris_reloc_map[0]); - --i >= 0;) + for (i = 0; i < sizeof (cris_reloc_map) / sizeof (cris_reloc_map[0]); i++) if (cris_reloc_map [i].bfd_reloc_val == code) return & cris_elf_howto_table [cris_reloc_map[i].cris_reloc_val];