Fix one more minor problem with a possible overflow in error checking
This commit was SVN r5092.
Этот коммит содержится в:
родитель
aaf1286847
Коммит
037e593f34
@ -47,10 +47,12 @@ int32_t ompi_ddt_sndrcv( void *sbuf, int32_t scount, const ompi_datatype_t* sdty
|
|||||||
int32_t freeAfter;
|
int32_t freeAfter;
|
||||||
|
|
||||||
/* First check if we really have something to do */
|
/* First check if we really have something to do */
|
||||||
if( 0 == (rcount * scount) ) {
|
if (0 == rcount) {
|
||||||
if( (0 == rcount) && (0 != scount) )
|
if (0 == scount) {
|
||||||
return MPI_ERR_TRUNCATE;
|
return MPI_SUCCESS;
|
||||||
return MPI_SUCCESS;
|
} else {
|
||||||
|
return MPI_ERR_TRUNCATE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If same datatypes used, just copy. */
|
/* If same datatypes used, just copy. */
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user