This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: trivial tidyup in bfd/reloc.c
- From: Ian Lance Taylor <iant at google dot com>
- To: Ben Elliston <bje at au1 dot ibm dot com>
- Cc: binutils at sourceware dot org
- Date: 25 Oct 2006 17:32:24 -0700
- Subject: Re: PATCH: trivial tidyup in bfd/reloc.c
- References: <20061026002216.GA23145@ozlabs.au.ibm.com>
Ben Elliston <bje@au1.ibm.com> writes:
> Committed as obvious. I don't think this is too contentious. ;-)
>
> Ben
>
>
> 2006-10-26 Ben Elliston <bje@au.ibm.com>
>
> * reloc.c (_bfd_relocate_contents): Remove explicit case 0.
>
> Index: reloc.c
> ===================================================================
> RCS file: /cvs/src/src/bfd/reloc.c,v
> retrieving revision 1.158
> diff -u -p -r1.158 reloc.c
> --- reloc.c 25 Oct 2006 06:49:20 -0000 1.158
> +++ reloc.c 26 Oct 2006 00:21:17 -0000
> @@ -1522,7 +1522,6 @@ _bfd_relocate_contents (reloc_howto_type
> switch (size)
> {
> default:
> - case 0:
> abort ();
> case 1:
> bfd_put_8 (input_bfd, x, location);
I just want to note that I don't think we should start a general trend
of removing cases that are the same as the default case. I think they
provide a useful comment, to wit: I have considered this case
explicitly, and this is how it should be handled.
In this particular case, though, I see no benefit to the "case 0", and
I think your patch is fine.
Ian