From 9f2c6a42c3c9be42057c8f7881cc2fdff6a36962 Mon Sep 17 00:00:00 2001 From: Joseph Schuchart Date: Tue, 5 Nov 2019 15:44:59 +0100 Subject: [PATCH] Shmem: use bitwise and instead of logical and to check for allocator capabilities Signed-off-by: Joseph Schuchart --- oshmem/mca/memheap/base/memheap_base_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oshmem/mca/memheap/base/memheap_base_alloc.c b/oshmem/mca/memheap/base/memheap_base_alloc.c index b83499f250..8ff20677ab 100644 --- a/oshmem/mca/memheap/base/memheap_base_alloc.c +++ b/oshmem/mca/memheap/base/memheap_base_alloc.c @@ -70,7 +70,7 @@ int mca_memheap_alloc_with_hint(size_t size, long hint, void** ptr) for (i = 0; i < mca_memheap_base_map.n_segments; i++) { map_segment_t *s = &mca_memheap_base_map.mem_segs[i]; - if (s->allocator && (hint && s->alloc_hints)) { + if (s->allocator && (hint & s->alloc_hints)) { /* Do not fall back to default allocator since it will break the * symmetry between PEs */