summaryrefslogtreecommitdiff
authorIan Romanick <ian.d.romanick@intel.com>2009-02-17 16:27:32 (GMT)
committer Ian Romanick <ian.d.romanick@intel.com>2009-02-17 16:27:32 (GMT)
commit4039603413f9f46d7f725463a70b4a51838e0049 (patch) (side-by-side diff)
tree42434505c91eecf425da0cdc471bbe486a99f6c1
parentbac13e54b164ceff7b921a2d17c4a198b42aeccf (diff)
downloadxserver-4039603413f9f46d7f725463a70b4a51838e0049.zip
xserver-4039603413f9f46d7f725463a70b4a51838e0049.tar.gz
glx: Inialize best_score before calculating visual scores
This bug was pointed out by Peter ├ůstrand. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--glx/glxscreens.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/glx/glxscreens.c b/glx/glxscreens.c
index 87119fb..6f68b06 100644
--- a/glx/glxscreens.c
+++ b/glx/glxscreens.c
@@ -354,7 +354,7 @@ static __GLXconfig *
pickFBConfig(__GLXscreen *pGlxScreen, VisualPtr visual)
{
__GLXconfig *best = NULL, *config;
- int best_score;
+ int best_score = 0;
for (config = pGlxScreen->fbconfigs; config != NULL; config = config->next) {
int score = 0;