Linux Test Project
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] futex_waitv01: Correct assign and add cleanup
Date: Thu, 14 Apr 2022 17:25:36 +0200	[thread overview]
Message-ID: <Ylg88D+B5FnMQjCl@pevik> (raw)
In-Reply-To: <Ylgkw1ZVsvgKWQXL@yuki>

Hi Zhao, Cyril,

> Hi!
> > +static void cleanup(void)
> > +{
> > +	if (futex != NULL)
> > +		free(futex);

> free(NULL) is no-op, there is no reason to check for NULL before passing
> a pointer to free().

> The rest of the changes looks good to me.

Removed if check before free(futex) and merged with Cyril's Reviewed-by: tag.

Thanks!

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

      reply	other threads:[~2022-04-14 15:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-13 11:24 [LTP] [PATCH] futex_waitv01: Correct assign and add cleanup Zhao Gongyi via ltp
2022-04-14 13:42 ` Cyril Hrubis
2022-04-14 15:25   ` Petr Vorel [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=Ylg88D+B5FnMQjCl@pevik \
    --to=pvorel@suse.cz \
    --cc=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /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