Merge pull request #974 from CAS-Atlantic/odin_coverity_CID203686
Odin coverity cid203686
diff --git a/ODIN_II/SRC/ast_elaborate.cpp b/ODIN_II/SRC/ast_elaborate.cpp
index bae5158..e4253fb 100644
--- a/ODIN_II/SRC/ast_elaborate.cpp
+++ b/ODIN_II/SRC/ast_elaborate.cpp
@@ -2184,9 +2184,9 @@
temp_instance->children[1]->children[0]->types.identifier,
NULL, -1);
- long sc_spot;
+ long sc_spot = sc_lookup_string(module_names_to_idx, temp_instance_name);
/* lookup the name of the module associated with this instantiated point */
- oassert((sc_spot = sc_lookup_string(module_names_to_idx, temp_instance_name)) != -1);
+ oassert(sc_spot != -1);
ast_node_t *instance = (ast_node_t *)module_names_to_idx->data[sc_spot];
/* elaboration */