summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2017-06-22 11:00:40 -0700
committerChad Versace <[email protected]>2017-06-22 12:35:49 -0700
commit927625ca60d56af0a8402b4a6697c0c8654d9a69 (patch)
tree21f6f0535d8320c0a71d5006257a23fffbb3a6a8 /src
parent263d4b8b1ca6d9955fcda7cc7d9edb6a8f4c045f (diff)
egl/surfaceless: Move loop vars inside the loop
That is, consistently do this: for (int i = 0; ...) No behavioral change. Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/egl/drivers/dri2/platform_surfaceless.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/egl/drivers/dri2/platform_surfaceless.c b/src/egl/drivers/dri2/platform_surfaceless.c
index f292f2b3fe3..d780ce4955c 100644
--- a/src/egl/drivers/dri2/platform_surfaceless.c
+++ b/src/egl/drivers/dri2/platform_surfaceless.c
@@ -201,11 +201,10 @@ surfaceless_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *dpy)
{ "RGB565", { 0x00f800, 0x07e0, 0x1f, 0x0 } },
};
unsigned int format_count[ARRAY_SIZE(visuals)] = { 0 };
- unsigned int count, i, j;
+ unsigned int count = 0;
- count = 0;
- for (i = 0; dri2_dpy->driver_configs[i] != NULL; i++) {
- for (j = 0; j < ARRAY_SIZE(visuals); j++) {
+ for (unsigned i = 0; dri2_dpy->driver_configs[i] != NULL; i++) {
+ for (unsigned j = 0; j < ARRAY_SIZE(visuals); j++) {
struct dri2_egl_config *dri2_conf;
dri2_conf = dri2_add_config(dpy, dri2_dpy->driver_configs[i],
@@ -219,7 +218,7 @@ surfaceless_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *dpy)
}
}
- for (i = 0; i < ARRAY_SIZE(format_count); i++) {
+ for (unsigned i = 0; i < ARRAY_SIZE(format_count); i++) {
if (!format_count[i]) {
_eglLog(_EGL_DEBUG, "No DRI config supports native format %s",
visuals[i].format_name);
@@ -272,7 +271,6 @@ dri2_initialize_surfaceless(_EGLDriver *drv, _EGLDisplay *disp)
{
struct dri2_egl_display *dri2_dpy;
const char* err;
- int i;
int driver_loaded = 0;
loader_set_logger(_eglLog);
@@ -286,7 +284,7 @@ dri2_initialize_surfaceless(_EGLDriver *drv, _EGLDisplay *disp)
const int limit = 64;
const int base = 128;
- for (i = 0; i < limit; ++i) {
+ for (int i = 0; i < limit; ++i) {
char *card_path;
if (asprintf(&card_path, DRM_RENDER_DEV_NAME, DRM_DIR_NAME, base + i) < 0)
continue;