Index: programs/Xserver/hw/xfree86/common/xf86Config.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/common/xf86Config.c,v
retrieving revision 1.20
diff -u -3 -p -r1.20 xf86Config.c
--- programs/Xserver/hw/xfree86/common/xf86Config.c	9 Dec 2005 15:30:05 -0000	1.20
+++ programs/Xserver/hw/xfree86/common/xf86Config.c	20 Dec 2005 06:10:16 -0000
@@ -452,7 +452,7 @@ static void
 fixup_video_driver_list(char **drivers)
 {
     static const char *fallback[5] = { "vga", "vesa", "fbdev", "wsfb", NULL };
-    char **end, **drv;
+    char **end, **drv, **drv2;
     char *x;
     char **ati, **atimisc;
     int i;
@@ -468,7 +468,9 @@ fixup_video_driver_list(char **drivers)
     for (i = 0; fallback[i]; i++) {
         for (drv = drivers; drv != end; drv++) {
             if (strstr(*drv, fallback[i])) {
-                x = *drv; *drv = *end; *end = x;
+                x = *drv;
+                *drv = *end;
+                *end = x;
                 end--;
                 break;
             }
@@ -481,10 +483,12 @@ fixup_video_driver_list(char **drivers)
     for (drv = drivers; drv != end; drv++) {
         if (!strcmp(*drv, "atimisc")) {
             atimisc = drv;
-            for (drv = atimisc; drv != end; drv++) {
-                if (!strcmp(*drv, "ati")) {
-                    ati = drv;
-                    x = *ati; *ati = *atimisc; *atimisc = x;
+            for (drv2 = atimisc; drv2 != end; drv2++) {
+                if (!strcmp(*drv2, "ati")) {
+                    ati = drv2;
+                    x = *ati;
+                    *ati = *atimisc;
+                    *atimisc = x;
                     return;
                 }
             }
