Skip to content

Commit 5389d2a

Browse files
committed
opal/datatype: attempt to fix the better fix :-)
Signed-off-by: Gilles Gouaillardet <[email protected]>
1 parent e1d31c7 commit 5389d2a

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

opal/datatype/opal_convertor_raw.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -172,16 +172,7 @@ opal_convertor_raw( opal_convertor_t* pConvertor,
172172
if( pElem->loop.common.flags & OPAL_DATATYPE_FLAG_CONTIGUOUS ) {
173173
ptrdiff_t offset = end_loop->first_elem_disp;
174174
source_base += offset;
175-
for(size_t i = count_desc; i > 0; i--, index++ ) {
176-
if (index >= *iov_count) {
177-
dt_elem_desc_t* nElem = pElem + 1;
178-
while (nElem->elem.common.type == OPAL_DATATYPE_LOOP) {
179-
nElem++;
180-
}
181-
assert(OPAL_DATATYPE_END_LOOP != nElem->elem.common.type);
182-
offset = nElem->elem.disp;
183-
break;
184-
}
175+
for(size_t i = MIN(count_desc, *iov_count - index); i > 0; i--, index++ ) {
185176
OPAL_DATATYPE_SAFEGUARD_POINTER( source_base, end_loop->size, pConvertor->pBaseBuf,
186177
pConvertor->pDesc, pConvertor->count );
187178
iov[index].iov_base = (IOVBASE_TYPE *) source_base;

0 commit comments

Comments
 (0)