From: Simon Marchi <simark@simark.ca>
To: Tom Tromey <tom@tromey.com>,
Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Cc: Simon Marchi <simon.marchi@efficios.com>
Subject: Re: [PATCH] gdb: remove unnecessary NULL checks before xfree
Date: Thu, 21 May 2020 13:12:24 -0400 [thread overview]
Message-ID: <63788603-81b4-89fc-717a-a555e9f6d5f6@simark.ca> (raw)
In-Reply-To: <87r1vd71mg.fsf@tromey.com>
On 2020-05-21 11:23 a.m., Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
>
> Simon> This patch removes the unnecessary NULL checks before calls to xfree.
> Simon> They are unnecessary because xfree already does a NULL check. Since
> Simon> free is supposed to handle NULL values correctly, the NULL check in
> Simon> xfree itself is also questionable, but I've left it there for now.
>
> Looks good. I think it's fine to remove the one from xfree as well.
>
> Note this same thing applies to delete. I don't know whether we have
> instances of that.
I've spotted some, but I won't change them as part of this patch, as I was focussing
on xfree.
Thanks to you and Pedro for reviewing, I'll push the patch.
Simon
next prev parent reply other threads:[~2020-05-21 17:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-21 15:10 Simon Marchi
2020-05-21 15:23 ` Tom Tromey
2020-05-21 17:12 ` Simon Marchi [this message]
2020-05-21 16:59 ` Pedro Alves
2020-05-21 17:11 ` Simon Marchi
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=63788603-81b4-89fc-717a-a555e9f6d5f6@simark.ca \
--to=simark@simark.ca \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@efficios.com \
--cc=tom@tromey.com \
/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