[Mesa-dev] [PATCH 047/133] nir/foreach_block: Return false if the callback on the last block fails

Jason Ekstrand jason at jlekstrand.net
Mon Dec 15 22:04:57 PST 2014


---
 src/glsl/nir/nir.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/glsl/nir/nir.c b/src/glsl/nir/nir.c
index 3c897b2..a12c209 100644
--- a/src/glsl/nir/nir.c
+++ b/src/glsl/nir/nir.c
@@ -1654,9 +1654,7 @@ nir_foreach_block(nir_function_impl *impl, nir_foreach_block_cb cb, void *state)
          return false;
    }
 
-   cb(impl->end_block, state);
-
-   return true;
+   return cb(impl->end_block, state);
 }
 
 static bool
-- 
2.2.0



More information about the mesa-dev mailing list