Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <xdje42@gmail.com>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [RFC] Casting NULL pointer
Date: Sun, 30 Aug 2015 16:06:00 -0000	[thread overview]
Message-ID: <CAP9bCMTDugwPaNn3b3i8Ayfo=L8q+i_G3Q_2O2qzBsyu1vMB4A@mail.gmail.com> (raw)
In-Reply-To: <20150830100944.GA3916@embecosm.com>

On Sun, Aug 30, 2015 at 3:09 AM, Andrew Burgess
<andrew.burgess@embecosm.com> wrote:
> There are a small (~26) number of places where the NULL pointer is
> cast list this:
>
>     char *wname = (char *) NULL;
>
> This compares to a huge number of places (~726) where we don't use a
> cast, so:
>
>     const char *name = NULL;
>
> I've never thought that the cast was either necessary or a
> particularly good idea, it feels like unneeded clutter.
>
> I only ask because I was about to push an obvious change that made a
> minor edit to a line containing one of the above casts.  I was tempted
> to remove the cast, in this case, as a clean up; however, I'm looking
> for confirmation that such a change would be viewed as clean up, and
> not an unnecessary change.
>
> As a  follow on, given the small number, I'm happy to submit a
> patch(es) to remove all of these casts, if its felt that would be a
> reasonable clean up.

Hi.
SGTM


      parent reply	other threads:[~2015-08-30 16:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-30 10:09 Andrew Burgess
2015-08-30 12:33 ` Mark Kettenis
2015-08-30 13:46   ` Andrew Burgess
2015-08-30 16:06 ` Doug Evans [this message]

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='CAP9bCMTDugwPaNn3b3i8Ayfo=L8q+i_G3Q_2O2qzBsyu1vMB4A@mail.gmail.com' \
    --to=xdje42@gmail.com \
    --cc=andrew.burgess@embecosm.com \
    --cc=gdb-patches@sourceware.org \
    /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