This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] replace some raw xmalloc / xrealloc with the XNEW* macros
- From: Trevor Saunders <tbsaunde at tbsaunde dot org>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: tbsaunde+binutils at tbsaunde dot org, binutils at sourceware dot org
- Date: Tue, 22 Mar 2016 17:58:18 -0400
- Subject: Re: [PATCH] replace some raw xmalloc / xrealloc with the XNEW* macros
- Authentication-results: sourceware.org; auth=none
- References: <1458491203-14134-1-git-send-email-tbsaunde+binutils at tbsaunde dot org> <56F1764B dot 3090606 at redhat dot com>
On Tue, Mar 22, 2016 at 04:43:55PM +0000, Nick Clifton wrote:
> Hi Trevor,
> > gas/ChangeLog:
> > 2016-03-19 Trevor Saunders <firstname.lastname@example.org>
> > * listing.c (listing_message): Use XNEW style allocation macros.
> > * read.c (read_a_source_file): Likewise.
> > (read_symbol_name): Likewise.
> > (s_mri_common): Likewise.
> > (assign_symbol): Likewise.
> > (s_reloc): Likewise.
> > (emit_expr_with_reloc): Likewise.
> > (s_incbin): Likewise.
> > (s_include): Likewise.
> > * sb.c (sb_build): Likewise.
> > (sb_check): Likewise.
> Approved - please apply.
> Note - I find it irksome that the type has to be specified in these
> macros, rather than extract from the variable being (re)allocated,
> but I could not think of any clean, non-GCC specific, way of
> achieving this. So please go ahead with the patch as is.
yeah, my thinking was mostly that its no worse than T *foo = (T *)