I'm pretty sure that ";" at the end of "if" statement
is not supposed to be there (not sure how it worked till
now though).
Also, making this condition a bit more readable.

Signed-off-by: Yevgeny Kliteynik <klit...@dev.mellanox.co.il>
---
 opensm/opensm/osm_mesh.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/opensm/opensm/osm_mesh.c b/opensm/opensm/osm_mesh.c
index 9d1082a..d156b7a 100644
--- a/opensm/opensm/osm_mesh.c
+++ b/opensm/opensm/osm_mesh.c
@@ -1385,7 +1385,8 @@ static int compare_switches(const void *p1, const void 
*p2)

        for (i = 0; i < ctx->mesh->dimension; i++) {
                j = ctx->mesh->dim_order[i];
-               if ((ret = s1->node->coord[j] - s2->node->coord[j]));
+               ret = s1->node->coord[j] - s2->node->coord[j];
+               if (ret)
                        return ret;
        }

-- 
1.6.2.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to