From 177c35bf13ca6e0e950802cbea909b149a7bf579 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Thu, 13 Dec 2018 17:35:28 +0000 Subject: [PATCH] egl: simplify loop Signed-off-by: Eric Engestrom Reviewed-by: Sagar Ghuge --- src/egl/main/egldisplay.c | 4 +--- 1 file changed, 1 insertion(+), 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 */ -- 2.30.2