public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Jeff Johnston <jjohnstn@redhat.com>
To: Sebastian Huber <sebastian.huber@embedded-brains.de>
Cc: Newlib <newlib@sourceware.org>
Subject: Re: [PATCH 2/2] newlib: Rename __sfmoreglue() and make it static
Date: Wed, 30 Mar 2022 15:34:48 -0400	[thread overview]
Message-ID: <CAOox84vWyN0+xT=nuNp8+xLV3Hcduuc4QQf0z3FHZ-=KmEhivw@mail.gmail.com> (raw)
In-Reply-To: <20220330095745.72802-2-sebastian.huber@embedded-brains.de>

Looks fine.

-- Jeff J.

On Wed, Mar 30, 2022 at 5:58 AM Sebastian Huber <
sebastian.huber@embedded-brains.de> wrote:

> Rename __sfmoreglue() in sfmoreglue() and make it static.  This function is
> only used by __sfp() in the same translation unit.
>
> Remove use of register keyword.
> ---
>  newlib/libc/stdio/findfp.c | 7 +++----
>  newlib/libc/stdio/local.h  | 1 -
>  2 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/newlib/libc/stdio/findfp.c b/newlib/libc/stdio/findfp.c
> index 7bb48e014..eca47bd92 100644
> --- a/newlib/libc/stdio/findfp.c
> +++ b/newlib/libc/stdio/findfp.c
> @@ -122,9 +122,8 @@ struct glue_with_file {
>    FILE file;
>  };
>
> -struct _glue *
> -__sfmoreglue (struct _reent *d,
> -       register int n)
> +static struct _glue *
> +sfmoreglue (struct _reent *d, int n)
>  {
>    struct glue_with_file *g;
>
> @@ -160,7 +159,7 @@ __sfp (struct _reent *d)
>         if (fp->_flags == 0)
>           goto found;
>        if (g->_next == NULL &&
> -         (g->_next = __sfmoreglue (d, NDYNAMIC)) == NULL)
> +         (g->_next = sfmoreglue (d, NDYNAMIC)) == NULL)
>         break;
>      }
>    _newlib_sfp_lock_exit ();
> diff --git a/newlib/libc/stdio/local.h b/newlib/libc/stdio/local.h
> index 09ccd6407..86422eb11 100644
> --- a/newlib/libc/stdio/local.h
> +++ b/newlib/libc/stdio/local.h
> @@ -184,7 +184,6 @@ extern void   _cleanup_r (struct _reent *);
>  extern void   __smakebuf_r (struct _reent *, FILE *);
>  extern int    __swhatbuf_r (struct _reent *, FILE *, size_t *, int *);
>  extern int    _fwalk_reent (struct _reent *, int (*)(struct _reent *,
> FILE *));
> -struct _glue * __sfmoreglue (struct _reent *,int n);
>  extern int __submore (struct _reent *, FILE *);
>
>  #ifdef __LARGE64_FILES
> --
> 2.34.1
>
>

  reply	other threads:[~2022-03-30 19:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-30  9:57 [PATCH 1/2] Replace _fwalk() calls with _fwalk_reent() Sebastian Huber
2022-03-30  9:57 ` [PATCH 2/2] newlib: Rename __sfmoreglue() and make it static Sebastian Huber
2022-03-30 19:34   ` Jeff Johnston [this message]
2022-03-30 19:34 ` [PATCH 1/2] Replace _fwalk() calls with _fwalk_reent() Jeff Johnston

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='CAOox84vWyN0+xT=nuNp8+xLV3Hcduuc4QQf0z3FHZ-=KmEhivw@mail.gmail.com' \
    --to=jjohnstn@redhat.com \
    --cc=newlib@sourceware.org \
    --cc=sebastian.huber@embedded-brains.de \
    /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).