This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] malloc: remove stale condition


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]