From: Pedro Alves <palves@redhat.com>
To: Christian Biesinger <cbiesinger@google.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH v3] Replace the remaining uses of strerror with safe_strerror
Date: Tue, 10 Dec 2019 16:41:00 -0000 [thread overview]
Message-ID: <0c0f5c29-6e43-ef01-20c1-f7acd89c9176@redhat.com> (raw)
In-Reply-To: <20191209191303.131746-1-cbiesinger@google.com>
On 12/9/19 7:13 PM, Christian Biesinger via gdb-patches wrote:
> +/* There are two different versions of strerror_r; one is GNU-specific, the
> + other XSI-compliant. They differ in the return type. This overload lets
> + us choose the right behavior for each return type. We cannot rely on Gnulib
> + to solve this for us because IPA does not use Gnulib but uses this
> + function. */
> +
> +/* Called if we have a XSI-compliant strerror_r. */
> +static char *select_strerror_r (int res, char *buf)
Formatting:
static char *
select_strerror_r (int res, char *buf)
> +{
> + return res == 0 ? buf : nullptr;
> +}
> +
> +/* Called if we have a GNU strerror_r. */
> +static char *select_strerror_r (char *res, char *)
Ditto.
> +{
> + return res;
> +}
> +
OK with those changes.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2019-12-10 16:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-26 19:59 [PATCH] " Christian Biesinger via gdb-patches
2019-11-26 21:11 ` [PATCH v2] " Christian Biesinger via gdb-patches
2019-12-06 20:06 ` [PATCH] " Pedro Alves
2019-12-06 20:36 ` Christian Biesinger via gdb-patches
2019-12-06 20:44 ` [PATCH v3] " Christian Biesinger via gdb-patches
2019-12-06 21:46 ` [PATCH] " Pedro Alves
2019-12-09 19:11 ` Christian Biesinger via gdb-patches
2019-12-09 19:13 ` [PATCH v3] " Christian Biesinger via gdb-patches
2019-12-10 16:41 ` Pedro Alves [this message]
2019-12-10 19:25 ` Christian Biesinger via gdb-patches
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=0c0f5c29-6e43-ef01-20c1-f7acd89c9176@redhat.com \
--to=palves@redhat.com \
--cc=cbiesinger@google.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