This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] malloc: remove stale condition
- From: Joern Engel <joern at purestorage dot com>
- To: "GNU C. Library" <libc-alpha at sourceware dot org>
- Cc: Siddhesh Poyarekar <siddhesh dot poyarekar at gmail dot com>, Joern Engel <joern at purestorage dot com>
- Date: Mon, 25 Jan 2016 16:25:27 -0800
- Subject: [PATCH] malloc: remove stale condition
- Authentication-results: sourceware.org; auth=none
- References: <1453767942-19369-1-git-send-email-joern at purestorage dot com>
It is no longer possible to get there with arena==NULL.
JIRA: PURE-27597
---
tpc/malloc2.13/arena.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tpc/malloc2.13/arena.h b/tpc/malloc2.13/arena.h
index 86e77ffe57f6..3e6107fbc4a4 100644
--- a/tpc/malloc2.13/arena.h
+++ b/tpc/malloc2.13/arena.h
@@ -817,7 +817,7 @@ static struct malloc_state *arena_get(size_t size)
if (!arena || arena->numa_node != node)
arena = numa_arena[node];
- if (arena && !mutex_trylock(&arena->mutex)) {
+ if (!mutex_trylock(&arena->mutex)) {
THREAD_STAT(++(arena->stat_lock_direct));
} else
arena = arena_get2(arena, size);
--
2.7.0.rc3