[PATCH] malloc: remove stale condition
Joern Engel
joern@purestorage.com
Tue Jan 26 00:32:00 GMT 2016
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
More information about the Libc-alpha
mailing list