nir/foreach_block: Return false if the callback on the last block fails
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 29 Oct 2014 21:16:39 +0000 (14:16 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 15 Jan 2015 15:19:00 +0000 (07:19 -0800)
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/glsl/nir/nir.c

index 25e71c74a3d5dea237a2721abf31c92dff5cd94b..68c8b7516a192d9c1a810d39ff5dd5e3330fc712 100644 (file)
@@ -1660,9 +1660,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