summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMike Hommey <mh@glandium.org>2012-04-18 16:29:49 (GMT)
committerJason Evans <jasone@canonware.com>2012-04-19 02:25:01 (GMT)
commit13067ec8350f213c3accc2e5fb70ca5a503e0e17 (patch)
tree97d4337aebf27096bfbb1f0b3fbe234e845ac106 /src
parent8ad483fe60a803acdbd403d88bb30b548ee1b5f9 (diff)
downloadjemalloc-13067ec8350f213c3accc2e5fb70ca5a503e0e17.zip
jemalloc-13067ec8350f213c3accc2e5fb70ca5a503e0e17.tar.gz
jemalloc-13067ec8350f213c3accc2e5fb70ca5a503e0e17.tar.bz2
Remove extra argument for malloc_tsd_cleanup_register
Bookkeeping an extra argument that actually only stores a function pointer for a function we already have is not very useful.
Diffstat (limited to 'src')
-rw-r--r--src/tsd.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/tsd.c b/src/tsd.c
index f63493d..281a2e9 100644
--- a/src/tsd.c
+++ b/src/tsd.c
@@ -46,7 +46,7 @@ _malloc_thread_cleanup(void)
again = false;
for (i = 0; i < ncleanups; i++) {
if (pending[i]) {
- pending[i] = cleanups[i].f(cleanups[i].arg);
+ pending[i] = cleanups[i]();
if (pending[i])
again = true;
}
@@ -56,12 +56,11 @@ _malloc_thread_cleanup(void)
#endif
void
-malloc_tsd_cleanup_register(bool (*f)(void *), void *arg)
+malloc_tsd_cleanup_register(bool (*f)(void))
{
assert(ncleanups < MALLOC_TSD_CLEANUPS_MAX);
- cleanups[ncleanups].f = f;
- cleanups[ncleanups].arg = arg;
+ cleanups[ncleanups] = f;
ncleanups++;
}