Fix compile time warning, and remove possibility of infinite loop.

This commit is contained in:
Nick Clifton 2000-11-21 19:47:10 +00:00
parent 732d96b6ca
commit a0fc8ba1d8
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2000-11-21 Nick Clifton <nickc@redhat.com>
* elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
remove possibility of infinite loop.
2000-11-20 Kazu Hirata <kazu@hxi.com>
* aix386-core.c: Fix formatting.

View File

@ -789,7 +789,7 @@ sh_elf_reloc_loop (r_type, input_bfd, input_section, contents, addr,
{
bfd_vma start0 = start - 4;
while (start0 >= 0 && IS_PPI (contents + start0))
while (start0 && IS_PPI (contents + start0))
start0 -= 2;
start0 = start - 2 - ((start - start0) & 2);
start = start0 - cum_diff - 2;