From: Eric Engestrom Date: Thu, 13 Dec 2018 17:35:28 +0000 (+0000) Subject: egl: simplify loop X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=177c35bf13ca6e0e950802cbea909b149a7bf579;p=mesa.git egl: simplify loop Signed-off-by: Eric Engestrom Reviewed-by: Sagar Ghuge --- 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 */