st_glsl_to_tgsi: cleanup variable storage search.
authorDave Airlie <airlied@redhat.com>
Thu, 8 Jun 2017 03:27:46 +0000 (13:27 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 8 Jun 2017 03:29:29 +0000 (13:29 +1000)
I forgot to put the cleanup in earlier.

Signed-off-by: Dave Airlie <airlied@redhat.com>
src/mesa/state_tracker/st_glsl_to_tgsi.cpp

index a0d593df92408e1cc0af96985f6e3833e71428ad..c5d2e0fcd2f4039e952b01b5b5db0de1a9728bfc 100644 (file)
@@ -1310,15 +1310,13 @@ glsl_to_tgsi_visitor::get_temp(const glsl_type *type)
 variable_storage *
 glsl_to_tgsi_visitor::find_variable_storage(ir_variable *var)
 {
-   struct hash_entry *entry = _mesa_hash_table_search(this->variables,
-                                                      var);
-   variable_storage *storage;
+   struct hash_entry *entry;
+
+   entry = _mesa_hash_table_search(this->variables, var);
    if (!entry)
       return NULL;
 
-   storage = (variable_storage *)entry->data;
-
-   return storage;
+   return (variable_storage *)entry->data;
 }
 
 void