@@ -8751,22 +8751,23 @@ ib_api_status_t torus_mcast_stree(void *context, osm_mgrp_box_t *mgb)
}
static
-bool good_xy_ring(struct torus *t, int x, int y, int z)
+bool good_xy_ring(struct torus *t, const int x, const int y, const int z)
{
struct t_switch ****sw = t->sw;
bool good_ring = true;
+ int x_tst, y_tst;
- for (x = 0; x < t->x_sz && good_ring; x++)
- good_ring = sw[x][y][z];
+ for (x_tst = 0; x_tst < t->x_sz && good_ring; x_tst++)
+ good_ring = sw[x_tst][y][z];
- for (y = 0; y < t->y_sz && good_ring; y++)
- good_ring = sw[x][y][z];
+ for (y_tst = 0; y_tst < t->y_sz && good_ring; y_tst++)
+ good_ring = sw[x][y_tst][z];
return good_ring;
}
static
-struct t_switch *find_plane_mid(struct torus *t, int z)
+struct t_switch *find_plane_mid(struct torus *t, const int z)
{
int x, dx, xm = t->x_sz / 2;
int y, dy, ym = t->y_sz / 2;