From: Nick Clifton Date: Fri, 18 Dec 2015 08:49:02 +0000 (+0000) Subject: Fix formatting of coff-i386.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ec70be9f6162aca5fb14876e232e68c64b1faa7f;p=binutils-gdb.git Fix formatting of coff-i386.c * coff-i386.c (coff_i386_reloc): Fix formatting. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index fafecd1a699..72f99be219f 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2015-12-18 Nick Clifton + + * coff-i386.c (coff_i386_reloc): Fix formatting. + 2015-12-16 Mickael Guene * bfd-in2.h: Regenerate. diff --git a/bfd/coff-i386.c b/bfd/coff-i386.c index a9725c4e1c7..1b1a8154cbc 100644 --- a/bfd/coff-i386.c +++ b/bfd/coff-i386.c @@ -139,41 +139,41 @@ coff_i386_reloc (bfd *abfd, #define DOIT(x) \ x = ((x & ~howto->dst_mask) | (((x & howto->src_mask) + diff) & howto->dst_mask)) - if (diff != 0) - { - reloc_howto_type *howto = reloc_entry->howto; - unsigned char *addr = (unsigned char *) data + reloc_entry->address; + if (diff != 0) + { + reloc_howto_type *howto = reloc_entry->howto; + unsigned char *addr = (unsigned char *) data + reloc_entry->address; + + switch (howto->size) + { + case 0: + { + char x = bfd_get_8 (abfd, addr); + DOIT (x); + bfd_put_8 (abfd, x, addr); + } + break; - switch (howto->size) + case 1: { - case 0: - { - char x = bfd_get_8 (abfd, addr); - DOIT (x); - bfd_put_8 (abfd, x, addr); - } - break; - - case 1: - { - short x = bfd_get_16 (abfd, addr); - DOIT (x); - bfd_put_16 (abfd, (bfd_vma) x, addr); - } - break; - - case 2: - { - long x = bfd_get_32 (abfd, addr); - DOIT (x); - bfd_put_32 (abfd, (bfd_vma) x, addr); - } - break; - - default: - abort (); + short x = bfd_get_16 (abfd, addr); + DOIT (x); + bfd_put_16 (abfd, (bfd_vma) x, addr); } - } + break; + + case 2: + { + long x = bfd_get_32 (abfd, addr); + DOIT (x); + bfd_put_32 (abfd, (bfd_vma) x, addr); + } + break; + + default: + abort (); + } + } /* Now let bfd_perform_relocation finish everything up. */ return bfd_reloc_continue;