diff options
author | Ian Rogers <irogers@google.com> | 2012-09-06 09:55:36 -0700 |
---|---|---|
committer | Ian Rogers <irogers@google.com> | 2012-09-06 09:59:13 -0700 |
commit | 09f76cdd9bba385b1eab4ffd6abd1aed96dce93d (patch) | |
tree | d6edcb20a932ed07ffdae25c9815f8cddb334281 /libc/upstream-dlmalloc | |
parent | ff4608ae0cb78caa05b83e109fc2633682958089 (diff) | |
download | bionic-09f76cdd9bba385b1eab4ffd6abd1aed96dce93d.zip bionic-09f76cdd9bba385b1eab4ffd6abd1aed96dce93d.tar.gz bionic-09f76cdd9bba385b1eab4ffd6abd1aed96dce93d.tar.bz2 |
Fix build warning of initialization but no use.
first_run is only used with LOCK_AT_FORK, however, care needs to be
taken with the #if to avoid compiler warnings when LOCK_AT_FORK isn't
being used.
Change-Id: I6bcfac2ab8732c91607f4a1bcd7c0019f29c2eec
Diffstat (limited to 'libc/upstream-dlmalloc')
-rw-r--r-- | libc/upstream-dlmalloc/malloc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/upstream-dlmalloc/malloc.c b/libc/upstream-dlmalloc/malloc.c index d951841..3ef9b61 100644 --- a/libc/upstream-dlmalloc/malloc.c +++ b/libc/upstream-dlmalloc/malloc.c @@ -3193,11 +3193,11 @@ static int init_mparams(void) { RELEASE_MALLOC_GLOBAL_LOCK(); /* BEGIN android-added: move pthread_atfork outside of lock */ -#if LOCK_AT_FORK if (first_run != 0) { +#if LOCK_AT_FORK pthread_atfork(&pre_fork, &post_fork_parent, &post_fork_child); - } #endif + } /* END android-added */ return 1; } |