Module: Mesa Branch: master Commit: 9870a5c6c9664d34432ba551ab9dce6ae79beaa4 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9870a5c6c9664d34432ba551ab9dce6ae79beaa4
Author: Brian Paul <[email protected]> Date: Mon Nov 9 17:25:22 2015 -0700 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 <[email protected]> Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: José Fonseca <[email protected]> --- src/gallium/state_trackers/wgl/stw_framebuffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/wgl/stw_framebuffer.c b/src/gallium/state_trackers/wgl/stw_framebuffer.c index 95d892a..09dede8 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; } _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
