]> sourceware.org Git - glibc.git/commitdiff
malloc: Make tunable callback functions static
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 7 May 2021 01:18:48 +0000 (18:18 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 7 May 2021 18:11:46 +0000 (11:11 -0700)
Since malloc tunable callback functions are only used within the same
file, we should make them static.

malloc/arena.c

index 9fbbb38a15affe455eb513e33bf08669aab26e11..7eb110445ef774c51d65e1027e0582da94cecf18 100644 (file)
@@ -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;                                    \
This page took 0.04974 seconds and 5 git commands to generate.