public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: "H.J. Lu" <hjl.tools@gmail.com>, libc-alpha@sourceware.org
Subject: Re: [PATCH] malloc: Make tunable callback functions static
Date: Fri, 7 May 2021 14:25:38 -0300	[thread overview]
Message-ID: <1fc5c9f4-aec0-c255-8df6-394c19da248e@linaro.org> (raw)
In-Reply-To: <20210507012141.2315877-1-hjl.tools@gmail.com>



On 06/05/2021 22:21, H.J. Lu via Libc-alpha wrote:
> Since malloc tunable callback functions are only used within the same
> file, we should make them static.

LGTM, thanks.

> ---
>  malloc/arena.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/malloc/arena.c b/malloc/arena.c
> index 9fbbb38a15..7eb110445e 100644
> --- a/malloc/arena.c
> +++ b/malloc/arena.c
> @@ -207,7 +207,7 @@ __malloc_fork_unlock_child (void)
>  }
>  
>  #if HAVE_TUNABLES
> -void
> +static void
>  TUNABLE_CALLBACK (set_mallopt_check) (tunable_val_t *valp)
>  {
>    int32_t value = (int32_t) valp->numval;
> @@ -217,7 +217,7 @@ TUNABLE_CALLBACK (set_mallopt_check) (tunable_val_t *valp)
>  
>  # define TUNABLE_CALLBACK_FNDECL(__name, __type) \
>  static inline int do_ ## __name (__type value);				      \
> -void									      \
> +static void									      \
>  TUNABLE_CALLBACK (__name) (tunable_val_t *valp)				      \
>  {									      \
>    __type value = (__type) (valp)->numval;				      \
> 

      reply	other threads:[~2021-05-07 17:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-07  1:21 H.J. Lu
2021-05-07 17:25 ` Adhemerval Zanella [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=1fc5c9f4-aec0-c255-8df6-394c19da248e@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=hjl.tools@gmail.com \
    --cc=libc-alpha@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).