Commit 7b8aef83 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

nxagentInitAndCheckVisuals: adapt bool usage to match the previous function

One question remains: why are we using "bool" instead of "Bool" here?
parent 67432ac2
...@@ -2492,12 +2492,10 @@ static int nxagentInitAndCheckVisuals(int flexibility) ...@@ -2492,12 +2492,10 @@ static int nxagentInitAndCheckVisuals(int flexibility)
long viMask; long viMask;
int i, n; int i, n;
int matched; bool matched;
int compatible; bool compatible = true;
int viNumList; int viNumList;
compatible = 1;
viMask = VisualScreenMask; viMask = VisualScreenMask;
viTemplate.screen = DefaultScreen(nxagentDisplay); viTemplate.screen = DefaultScreen(nxagentDisplay);
viTemplate.depth = DefaultDepth(nxagentDisplay, DefaultScreen(nxagentDisplay)); viTemplate.depth = DefaultDepth(nxagentDisplay, DefaultScreen(nxagentDisplay));
...@@ -2507,7 +2505,7 @@ static int nxagentInitAndCheckVisuals(int flexibility) ...@@ -2507,7 +2505,7 @@ static int nxagentInitAndCheckVisuals(int flexibility)
for (i = 0; i < nxagentNumVisuals; i++) for (i = 0; i < nxagentNumVisuals; i++)
{ {
matched = 0; matched = false;
for (n = 0; n < viNumList; n++) for (n = 0; n < viNumList; n++)
{ {
...@@ -2528,7 +2526,7 @@ FIXME: Should the visual be ignored in this case? ...@@ -2528,7 +2526,7 @@ FIXME: Should the visual be ignored in this case?
#endif #endif
} }
matched = 1; matched = true;
nxagentVisualHasBeenIgnored[i] = FALSE; nxagentVisualHasBeenIgnored[i] = FALSE;
...@@ -2538,7 +2536,7 @@ FIXME: Should the visual be ignored in this case? ...@@ -2538,7 +2536,7 @@ FIXME: Should the visual be ignored in this case?
} }
} }
if (matched == 0) if (!matched)
{ {
if (nxagentVisuals[i].class == DirectColor) if (nxagentVisuals[i].class == DirectColor)
{ {
...@@ -2564,7 +2562,7 @@ FIXME: Should the visual be ignored in this case? ...@@ -2564,7 +2562,7 @@ FIXME: Should the visual be ignored in this case?
fprintf(stderr, "\tbits_per_rgb = %d\n", nxagentVisuals[i].bits_per_rgb); fprintf(stderr, "\tbits_per_rgb = %d\n", nxagentVisuals[i].bits_per_rgb);
#endif #endif
compatible = 0; compatible = false;
break; break;
} }
...@@ -2573,7 +2571,7 @@ FIXME: Should the visual be ignored in this case? ...@@ -2573,7 +2571,7 @@ FIXME: Should the visual be ignored in this case?
XFree(viList); XFree(viList);
if (compatible == 1) if (compatible)
{ {
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentInitAndCheckVisuals: New visuals match with old visuals.\n"); fprintf(stderr, "nxagentInitAndCheckVisuals: New visuals match with old visuals.\n");
......
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