From ff9ecc183f310eaf705b1ff6826b71d84b0e838f Mon Sep 17 00:00:00 2001 From: Mikhail Brinskii Date: Tue, 14 May 2019 22:34:01 +0300 Subject: [PATCH] SPML/UCX: Fix coverity error Signed-off-by: Mikhail Brinskii (cherry picked from commit d81dc533f6f7ebba0b00c1652190975f0aca9e06) --- oshmem/mca/spml/ucx/spml_ucx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/oshmem/mca/spml/ucx/spml_ucx.c b/oshmem/mca/spml/ucx/spml_ucx.c index bd43baf381..b15f5d84db 100644 --- a/oshmem/mca/spml/ucx/spml_ucx.c +++ b/oshmem/mca/spml/ucx/spml_ucx.c @@ -886,8 +886,10 @@ int mca_spml_ucx_put_all_nb(void *dest, const void *source, size_t size, long *c ctx = oshmem_ctx_default; } + assert(ctx != NULL); /* make coverity happy */ + for (peer = 0; peer < oshmem_num_procs(); peer++) { - dst_pe = (peer + my_pe) % oshmem_group_all->proc_count; + dst_pe = (peer + my_pe) % oshmem_num_procs(); rc = mca_spml_ucx_put_nb(ctx, (void*)((uintptr_t)dest + my_pe * size), size,