computeFaceTopology(): Initialise all elements of the mask array to -1. The ={-1} syntax just sets mask[0], leaving [1..7] at the default value (zero).

Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
This commit is contained in:
Bård Skaflestad 2012-06-08 17:25:09 +00:00 committed by Bård Skaflestad
parent de91035e3a
commit 8884e4fc59

View File

@ -67,9 +67,12 @@ static int *computeFaceTopology(int *a1,
int intersect[4],
int *faces)
{
int mask[8] = {-1};
int mask[8];
int k;
int *f;
for (k = 0; k < 8; k++) { mask[k] = -1; }
/* Which pillar points should we use? */
if (a1[1] > b1[1]){ mask[0] = b1[1]; } else { mask[0] = a1[1]; }
if (a2[1] > b2[1]){ mask[2] = b2[1]; } else { mask[2] = a2[1]; }