From: Simon Marchi <simon.marchi@polymtl.ca>
To: Philippe Waroquiers <philippe.waroquiers@skynet.be>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFAv3 2/2] Factorize macro definition code in macrotab.c
Date: Wed, 06 Feb 2019 04:12:00 -0000 [thread overview]
Message-ID: <d5206fd0749af653b7a5cca0b49cfe79@polymtl.ca> (raw)
In-Reply-To: <20190126223117.6718-3-philippe.waroquiers@skynet.be>
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,
Simon
next prev parent reply other threads:[~2019-02-06 4:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-26 22:31 [RFAv3 0/2] Fix leaks in macro definition Philippe Waroquiers
2019-01-26 22:31 ` [RFAv3 1/2] Fix leak of identifier " Philippe Waroquiers
2019-02-06 4:08 ` Simon Marchi
2019-01-26 22:31 ` [RFAv3 2/2] Factorize macro definition code in macrotab.c Philippe Waroquiers
2019-02-06 4:12 ` Simon Marchi [this message]
2019-02-06 20:08 ` Philippe Waroquiers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d5206fd0749af653b7a5cca0b49cfe79@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
--cc=philippe.waroquiers@skynet.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).