From 9870a5c6c9664d34432ba551ab9dce6ae79beaa4 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 9 Nov 2015 17:25:22 -0700 Subject: [PATCH] st/wgl: clarify code in stw_framebuffer_from_hwnd_locked() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- 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 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; } -- 2.30.2