From 6d0b3eaec294128ffa7abf78c37b7b9aea95f926 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Thu, 29 Jan 2015 10:25:00 +0100 Subject: [PATCH] Avoid shadowing variables --- unix/xserver/hw/vnc/xvnc.c | 42 +++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/unix/xserver/hw/vnc/xvnc.c b/unix/xserver/hw/vnc/xvnc.c index e4d2112d..e49ac77f 100644 --- a/unix/xserver/hw/vnc/xvnc.c +++ b/unix/xserver/hw/vnc/xvnc.c @@ -424,10 +424,10 @@ ddxProcessArgument(int argc, char *argv[], int i) pix = atoi(argv[i]); if (-1 == lastScreen) { - int i; - for (i = 0; i < MAXSCREENS; i++) + int j; + for (j = 0; j < MAXSCREENS; j++) { - vfbScreens[i].blackPixel = pix; + vfbScreens[j].blackPixel = pix; } } else @@ -444,10 +444,10 @@ ddxProcessArgument(int argc, char *argv[], int i) pix = atoi(argv[i]); if (-1 == lastScreen) { - int i; - for (i = 0; i < MAXSCREENS; i++) + int j; + for (j = 0; j < MAXSCREENS; j++) { - vfbScreens[i].whitePixel = pix; + vfbScreens[j].whitePixel = pix; } } else @@ -464,10 +464,10 @@ ddxProcessArgument(int argc, char *argv[], int i) linebias = atoi(argv[i]); if (-1 == lastScreen) { - int i; - for (i = 0; i < MAXSCREENS; i++) + int j; + for (j = 0; j < MAXSCREENS; j++) { - vfbScreens[i].lineBias = linebias; + vfbScreens[j].lineBias = linebias; } } else @@ -532,10 +532,10 @@ ddxProcessArgument(int argc, char *argv[], int i) if (-1 == lastScreen) { - int i; - for (i = 0; i < MAXSCREENS; i++) + int j; + for (j = 0; j < MAXSCREENS; j++) { - SET_PIXEL_FORMAT(vfbScreens[i]); + SET_PIXEL_FORMAT(vfbScreens[j]); } } else @@ -1585,7 +1585,7 @@ static ExtensionModule glxExt = { #endif void -InitOutput(ScreenInfo *screenInfo, int argc, char **argv) +InitOutput(ScreenInfo *scrInfo, int argc, char **argv) { int i; int NumFormats = 0; @@ -1630,18 +1630,18 @@ InitOutput(ScreenInfo *screenInfo, int argc, char **argv) { if (NumFormats >= MAXFORMATS) FatalError ("MAXFORMATS is too small for this server\n"); - screenInfo->formats[NumFormats].depth = i; - screenInfo->formats[NumFormats].bitsPerPixel = vfbBitsPerPixel(i); - screenInfo->formats[NumFormats].scanlinePad = BITMAP_SCANLINE_PAD; + scrInfo->formats[NumFormats].depth = i; + scrInfo->formats[NumFormats].bitsPerPixel = vfbBitsPerPixel(i); + scrInfo->formats[NumFormats].scanlinePad = BITMAP_SCANLINE_PAD; NumFormats++; } } - screenInfo->imageByteOrder = IMAGE_BYTE_ORDER; - screenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT; - screenInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD; - screenInfo->bitmapBitOrder = BITMAP_BIT_ORDER; - screenInfo->numPixmapFormats = NumFormats; + scrInfo->imageByteOrder = IMAGE_BYTE_ORDER; + scrInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT; + scrInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD; + scrInfo->bitmapBitOrder = BITMAP_BIT_ORDER; + scrInfo->numPixmapFormats = NumFormats; /* initialize screens */ -- 2.39.5