public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Guinevere Larsen <blarsen@redhat.com>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdbserver: add client_state destructor
Date: Fri, 3 May 2024 10:33:29 -0300	[thread overview]
Message-ID: <04192a28-b4aa-4e07-878e-bde3f6472b20@redhat.com> (raw)
In-Reply-To: <87bk5ndntn.fsf@tromey.com>

On 5/3/24 10:31, Tom Tromey wrote:
>>>>>> "Guinevere" == Guinevere Larsen <blarsen@redhat.com> writes:
> Guinevere> +  ~client_state ()
> Guinevere> +  {
> Guinevere> +    if (own_buf != nullptr)
> Guinevere> +      xfree (own_buf);
> Guinevere> +  }
>
> A null check isn't needed when calling xfree.
Thanks (and thanks Keith). I'll remove this locally.
> At some point we went through the tree and removed all these IIRC.
I think I have a case of friday brains. You mean removed all nullptr 
checks, or removed unnecessary xfrees?

-- 
Cheers,
Guinevere Larsen
She/Her/Hers

>
> Tom
>


  reply	other threads:[~2024-05-03 13:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-03 12:29 Guinevere Larsen
2024-05-03 13:21 ` Keith Seitz
2024-05-03 13:31 ` Tom Tromey
2024-05-03 13:33   ` Guinevere Larsen [this message]
2024-05-03 15:17     ` Tom Tromey
2024-05-03 16:14       ` Pedro Alves
2024-05-03 17:00         ` Simon Marchi
2024-05-20 16:54           ` Guinevere Larsen

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=04192a28-b4aa-4e07-878e-bde3f6472b20@redhat.com \
    --to=blarsen@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).