From ee6ce7e4cc23db26c7a5eb5ead41c1d057ca92e7 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 17 Feb 2009 08:27:32 -0800 Subject: [PATCH] glx: Inialize best_score before calculating visual scores MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This bug was pointed out by Peter Åstrand. Signed-off-by: Ian Romanick (cherry picked from commit 4039603413f9f46d7f725463a70b4a51838e0049) --- glx/glxscreens.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glx/glxscreens.c b/glx/glxscreens.c index 8917269c3..e7258ddc0 100644 --- a/glx/glxscreens.c +++ b/glx/glxscreens.c @@ -403,7 +403,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;