From: Brian Paul Date: Tue, 10 Nov 2015 00:25:22 +0000 (-0700) Subject: st/wgl: clarify code in stw_framebuffer_from_hwnd_locked() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9870a5c6c9664d34432ba551ab9dce6ae79beaa4;p=mesa.git st/wgl: clarify code in stw_framebuffer_from_hwnd_locked() Just a minor code change to make it obvious that NULL is returned when we don't find the given HWND. Reviewed-by: Sinclair Yeh Reviewed-by: Charmaine Lee Reviewed-by: José Fonseca --- diff --git a/src/gallium/state_trackers/wgl/stw_framebuffer.c b/src/gallium/state_trackers/wgl/stw_framebuffer.c index 95d892add34..09dede8d2a1 100644 --- a/src/gallium/state_trackers/wgl/stw_framebuffer.c +++ b/src/gallium/state_trackers/wgl/stw_framebuffer.c @@ -55,10 +55,10 @@ stw_framebuffer_from_hwnd_locked(HWND hwnd) for (fb = stw_dev->fb_head; fb != NULL; fb = fb->next) if (fb->hWnd == hwnd) { pipe_mutex_lock(fb->mutex); - break; + return fb; } - return fb; + return NULL; }