Commit 53ecc162 authored by Shane Snyder's avatar Shane Snyder
Browse files

fix logical checks on input ranks

parent 926abf91
Pipeline #211 skipped
......@@ -344,7 +344,7 @@ int ssg_get_count(const ssg_t s)
hg_addr_t ssg_get_addr(const ssg_t s, int rank)
{
if (rank >= 0 || rank < s->num_addrs)
if (rank >= 0 && rank < s->num_addrs)
return s->addrs[rank];
else
return HG_ADDR_NULL;
......@@ -352,7 +352,7 @@ hg_addr_t ssg_get_addr(const ssg_t s, int rank)
const char * ssg_get_addr_str(const ssg_t s, int rank)
{
if (rank >= 0 || rank < s->num_addrs)
if (rank >= 0 && rank < s->num_addrs)
return s->addr_strs[rank];
else
return NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment