1
1

Fix Coverity warning CID 1413323 (#3764)

Signed-off-by: Clement Foyer <clement.foyer@inria.fr>
Этот коммит содержится в:
Clément FOYER 2017-06-27 12:39:31 +02:00 коммит произвёл bosilca
родитель 1c336b8fad
Коммит c885ee3f3c

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

@ -47,7 +47,7 @@ static opal_hash_table_t *comm_data = NULL;
static inline void mca_common_monitoring_coll_check_name(mca_monitoring_coll_data_t*data) static inline void mca_common_monitoring_coll_check_name(mca_monitoring_coll_data_t*data)
{ {
if( data->comm_name && data->p_comm && (data->p_comm->c_flags & OMPI_COMM_NAMEISSET) if( data->comm_name && data->p_comm && (data->p_comm->c_flags & OMPI_COMM_NAMEISSET)
&& data->p_comm->c_name && 0 < strlen(data->p_comm->c_name) && 0 < strlen(data->p_comm->c_name)
&& 0 != strncmp(data->p_comm->c_name, data->comm_name, OPAL_MAX_OBJECT_NAME - 1) ) && 0 != strncmp(data->p_comm->c_name, data->comm_name, OPAL_MAX_OBJECT_NAME - 1) )
{ {
free(data->comm_name); free(data->comm_name);
@ -101,7 +101,9 @@ mca_monitoring_coll_data_t*mca_common_monitoring_coll_new( ompi_communicator_t*c
return NULL; return NULL;
} }
data->p_comm = comm; data->procs = NULL;
data->comm_name = NULL;
data->p_comm = comm;
/* Allocate hashtable */ /* Allocate hashtable */
if( NULL == comm_data ) { if( NULL == comm_data ) {