This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]