[RFAv3 2/2] Factorize macro definition code in macrotab.c

Philippe Waroquiers philippe.waroquiers@skynet.be
Wed Feb 6 20:08:00 GMT 2019


On Tue, 2019-02-05 at 23:12 -0500, Simon Marchi wrote:
> On 2019-01-26 17:31, Philippe Waroquiers wrote:
> > When first fixing splay tree key leaks in macrotab.c, some duplicated 
> > code
> > logic was factorized.
> > The key leaks will be fixed in libiberty, but the code factorization
> > is better kept in any case.
> 
> LGTM, with just a nit:
> 
> > +/* A helper function to define a new object-like macro.  */
> > +
> > +static void
> > +macro_define_object_internal (struct macro_source_file *source, int 
> > line,
> > +			      const char *name, const char *replacement,
> > +			      enum macro_special_kind special_kind)
> > +{
> > +  macro_define_internal (source, line,
> > +			 name, macro_object_like,
> > +			 special_kind, 0,
> > +			 replacement);
> > +}
> 
> Since it is a pointer parameter, could you change the "0" for "NULL" or 
> "nullptr"?
Thanks for the review, I pushed the series after doing the fixes
in this and in the other mail.

Philippe



More information about the Gdb-patches mailing list