1
1

Merge pull request #960 from rhc54/topic/cov

Cleanup some coverity warnings
Этот коммит содержится в:
rhc54 2015-09-30 12:33:09 -07:00
родитель 33f2a2d35a 8f6855459d
Коммит 8f4e1133cd
3 изменённых файлов: 9 добавлений и 6 удалений

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

@ -199,6 +199,8 @@ extern int opal_pmix_base_exchange(opal_value_t *info,
*(sz) = _kv->data.bo.size; \ *(sz) = _kv->data.bo.size; \
_kv->data.bo.bytes = NULL; /* protect the data */ \ _kv->data.bo.bytes = NULL; /* protect the data */ \
OBJ_RELEASE(_kv); \ OBJ_RELEASE(_kv); \
} else { \
*(sz) = 0; \
} \ } \
} while(0); } while(0);

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

@ -129,8 +129,8 @@ static void dmodex_req(int sd, short args, void *cbdata)
orte_proc_t *proct, *dmn; orte_proc_t *proct, *dmn;
int rc, rnum; int rc, rnum;
opal_buffer_t *buf; opal_buffer_t *buf;
uint8_t *data; uint8_t *data=NULL;
int32_t sz; int32_t sz=0;
/* a race condition exists here because of the thread-shift - it is /* a race condition exists here because of the thread-shift - it is
* possible that data for the specified proc arrived while we were * possible that data for the specified proc arrived while we were

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

@ -465,7 +465,7 @@ orte_vpid_t orte_get_proc_daemon_vpid(orte_process_name_t *proc)
char* orte_get_proc_hostname(orte_process_name_t *proc) char* orte_get_proc_hostname(orte_process_name_t *proc)
{ {
orte_proc_t *proct; orte_proc_t *proct;
char *hostname; char *hostname = NULL;
int rc; int rc;
/* don't bother error logging any not-found situations /* don't bother error logging any not-found situations
@ -507,12 +507,13 @@ orte_node_rank_t orte_get_proc_node_rank(orte_process_name_t *proc)
} }
/* if we are an app, get the value from the modex db */ /* if we are an app, get the value from the modex db */
noderank = &nd;
OPAL_MODEX_RECV_VALUE(rc, OPAL_PMIX_NODE_RANK, OPAL_MODEX_RECV_VALUE(rc, OPAL_PMIX_NODE_RANK,
(opal_process_name_t*)proc, (opal_process_name_t*)proc,
&noderank, ORTE_NODE_RANK); &noderank, ORTE_NODE_RANK);
if (OPAL_SUCCESS != rc) {
nd = *noderank; nd = ORTE_NODE_RANK_INVALID;
free(noderank); }
return nd; return nd;
} }