From: Thomas Huth <thuth@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Daniel P . Berrangé" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org, Eric Blake <eblake@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] util/error: Remove an unnecessary NULL check
Date: Fri, 7 Dec 2018 19:16:50 +0100 [thread overview]
Message-ID: <77cd62fe-4b9e-88ac-b048-1d4a6ee5ff83@redhat.com> (raw)
In-Reply-To: <20181207161447.31314-1-philmd@redhat.com>
On 2018-12-07 17:14, Philippe Mathieu-Daudé wrote:
> This NULL check was required while introduced in 680d16dcb79f.
> Later refactor added a NULL check in error_setv(), so this check
> is now redundant.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> util/error.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/util/error.c b/util/error.c
> index b5ccbd8eac..934a78e1b1 100644
> --- a/util/error.c
> +++ b/util/error.c
> @@ -103,10 +103,6 @@ void error_setg_errno_internal(Error **errp,
> va_list ap;
> int saved_errno = errno;
Could the saved_errno now be removed, too, since err_setv does that again?
Thomas
> - if (errp == NULL) {
> - return;
> - }
> -
> va_start(ap, fmt);
> error_setv(errp, src, line, func, ERROR_CLASS_GENERIC_ERROR, fmt, ap,
> os_errno != 0 ? strerror(os_errno) : NULL);
>
next prev parent reply other threads:[~2018-12-07 18:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-07 16:14 [Qemu-devel] [PATCH] util/error: Remove an unnecessary NULL check Philippe Mathieu-Daudé
2018-12-07 16:22 ` Daniel P. Berrangé
2018-12-07 18:01 ` Markus Armbruster
2018-12-07 18:16 ` Thomas Huth [this message]
2018-12-07 19:10 ` Philippe Mathieu-Daudé
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=77cd62fe-4b9e-88ac-b048-1d4a6ee5ff83@redhat.com \
--to=thuth@redhat.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=eblake@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).