This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [RFA/hpux] Implement file_matches_executable_p
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Fri, 23 Dec 2005 14:22:43 +0400
- Subject: Re: [RFA/hpux] Implement file_matches_executable_p
- References: <20051113210034.GX1635@adacore.com> <20051114024708.GA10807@nevyn.them.org> <20051117011431.GB1635@adacore.com> <20051117042611.GA4250@nevyn.them.org> <20051118004719.GM1635@adacore.com> <20051118010439.GO1635@adacore.com> <20051118023215.GB31442@nevyn.them.org> <20051125025451.GN1635@adacore.com> <20051202184121.GU1215@adacore.com> <43AAE9AB.6080300@redhat.com>
> >>2005-11-17 Joel Brobecker <brobecker@adacore.com>
> >>
> >> * corefile.c (generic_core_file_matches_executable_p): New
> >> function.
> >> * libbfd-in.h (generic_core_file_matches_executable_p): Add
> >> declaration.
> >> * libbfd.h: Regenerate.
> >> * hpux-core.c: ANSIfy function declarations and prototypes.
> >> (thread_section_p): Manually expand bfd_section_name macro
> >> to make it clear that parameter ABFD is not used.
> >> (hpux_core_core_file_matches_executable_p): Delete, replaced
> >> by macro pointing to generic_core_file_matches_executable_p.
> >>
> >> * aix386-core.c: Replace core_file_matches_executable_p null
> >> implementation by generic_core_file_matches_executable_p by
> >> using a macro.
> >> * aix5ppc-core.c: Likewise.
> >> * cisco-core.c: Likewise.
> >> * hppabsd-core.c: Likewise.
> >> * irix-core.c: Likewise.
> >> * lynx-core.c: Likewise.
> >> * mach-o.c: Likewise.
> >> * netbsd-core.c: Likewise.
> >> * osf-core.c: Likewise.
> >> * ptrace-core.c: Likewise.
> >> * sco5-core.c: Likewise.
> >> * trad-core.c: Likewise.
>
> Approved - please apply.
Thanks Nick. Checked in.
> Sorry for the delay in getting round to review this patch.
No worries, I have complaint. We're all busy.
> This is one
> small formatting glitch:
>
> return (strcmp(exec, core) == 0);
>
> Should be:
>
> return (strcmp (exec, core) == 0);
>
> Personally I do not like extraneous parentheses in return statements
> either, so this could also be:
>
> return strcmp (exec, core) == 0;
I went for the latter. Sometimes, parens are useful to help GNU indent
find the proper indentation. But in this case, it's not warranted.
I still added them originally because I was concerned that there might
be a consistency rule regarding this.
Cheers,
--
Joel