From: "Christian Biesinger via gdb-patches" <gdb-patches@sourceware.org>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH v3] Replace the remaining uses of strerror with safe_strerror
Date: Tue, 10 Dec 2019 19:25:00 -0000 [thread overview]
Message-ID: <CAPTJ0XEEAW1-AB3VYNxzECC7gXLSJ4RETOE+3K9sFfG=Gy+gdw@mail.gmail.com> (raw)
In-Reply-To: <0c0f5c29-6e43-ef01-20c1-f7acd89c9176@redhat.com>
On Tue, Dec 10, 2019 at 11:41 AM Pedro Alves <palves@redhat.com> wrote:
>
> 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, made those changes and pushed. Also updated the commit message.
To ssh://sourceware.org/git/binutils-gdb.git
0e7aaa728d..ab7d13f070 HEAD -> master
Christian
prev parent reply other threads:[~2019-12-10 19:25 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
2019-12-10 19:25 ` Christian Biesinger via gdb-patches [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='CAPTJ0XEEAW1-AB3VYNxzECC7gXLSJ4RETOE+3K9sFfG=Gy+gdw@mail.gmail.com' \
--to=gdb-patches@sourceware.org \
--cc=cbiesinger@google.com \
--cc=palves@redhat.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