aboutsummaryrefslogtreecommitdiffstats
path: root/src/egl/main
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2018-12-13 17:35:28 +0000
committerEric Engestrom <[email protected]>2019-07-01 19:35:22 +0100
commit177c35bf13ca6e0e950802cbea909b149a7bf579 (patch)
tree3eacbc51f908fd97c49b8432c88c15f09340c3cc /src/egl/main
parent67ffb853f05eb24222970261018f6ed0982e6be4 (diff)
egl: simplify loop
Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Sagar Ghuge<[email protected]>
Diffstat (limited to 'src/egl/main')
-rw-r--r--src/egl/main/egldisplay.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c
index 193443e056c..c1e8c341ac6 100644
--- a/src/egl/main/egldisplay.c
+++ b/src/egl/main/egldisplay.c
@@ -262,12 +262,10 @@ _eglFindDisplay(_EGLPlatformType plat, void *plat_dpy,
mtx_lock(_eglGlobal.Mutex);
/* search the display list first */
- disp = _eglGlobal.DisplayList;
- while (disp) {
+ for (disp = _eglGlobal.DisplayList; disp; disp = disp->Next) {
if (disp->Platform == plat && disp->PlatformDisplay == plat_dpy &&
_eglSameAttribs(disp->Options.Attribs, attrib_list))
break;
- disp = disp->Next;
}
/* create a new display */