1
1

Merge pull request #3744 from hjelmn/ompi_cov

opal: fix coverity issues
Этот коммит содержится в:
Nathan Hjelm 2017-06-23 09:09:42 -06:00 коммит произвёл GitHub
родитель 52d44afb74 db973437e1
Коммит b638612a98
2 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -257,7 +257,7 @@ void opal_graph_add_vertex(opal_graph_t *graph, opal_graph_vertex_t *vertex)
int opal_graph_add_edge(opal_graph_t *graph, opal_graph_edge_t *edge)
{
opal_adjacency_list_t *aj_list, *start_aj_list= NULL;
bool start_found = false, end_found = false;
bool end_found = false;
/**
@ -265,7 +265,6 @@ int opal_graph_add_edge(opal_graph_t *graph, opal_graph_edge_t *edge)
*/
OPAL_LIST_FOREACH(aj_list, graph->adjacency_list, opal_adjacency_list_t) {
if (aj_list->vertex == edge->start) {
start_found = true;
start_aj_list = aj_list;
}
if (aj_list->vertex == edge->end) {
@ -276,7 +275,7 @@ int opal_graph_add_edge(opal_graph_t *graph, opal_graph_edge_t *edge)
* if one of the vertices either the start or the end is not
* found - return an error.
*/
if (false == start_found && false == end_found) {
if (NULL == start_aj_list || false == end_found) {
return OPAL_ERROR;
}
/* point the edge to the adjacency list of the start vertex (for easy search) */

Просмотреть файл

@ -193,7 +193,7 @@ opal_mem_hooks_register_release(opal_mem_hooks_callback_fn_t *func, void *cbdata
int
opal_mem_hooks_unregister_release(opal_mem_hooks_callback_fn_t* func)
{
callback_list_item_t *cbitem, *found_item;
callback_list_item_t *cbitem, *found_item = NULL;
int ret = OPAL_ERR_NOT_FOUND;
opal_atomic_lock(&release_lock);