Skip to content

Commit b2c4737

Browse files
Ralph Castainggouaillardet
authored andcommitted
Don't set the return value pointer to NULL as it actually is required to point to real storage - just return an error code if a modex recv doesn't succeed.
(cherry picked from commit open-mpi/ompi@ec5d001)
1 parent 44ea9ef commit b2c4737

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

opal/mca/pmix/pmix.h

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,7 @@ extern int opal_pmix_base_exchange(opal_value_t *info,
139139
_info->type = OPAL_BOOL; \
140140
_info->data.flag = true; \
141141
opal_list_append(&(_ilist), &(_info)->super); \
142-
if (OPAL_SUCCESS != ((r) = opal_pmix.get((p), (s), &(_ilist), &(_kv)))) { \
143-
*(d) = NULL; \
144-
} else { \
142+
if (OPAL_SUCCESS == ((r) = opal_pmix.get((p), (s), &(_ilist), &(_kv)))) { \
145143
(r) = opal_value_unload(_kv, (void**)(d), (t)); \
146144
OBJ_RELEASE(_kv); \
147145
} \
@@ -168,9 +166,7 @@ extern int opal_pmix_base_exchange(opal_value_t *info,
168166
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), \
169167
__FILE__, __LINE__, \
170168
OPAL_NAME_PRINT(*(p)), (s))); \
171-
if (OPAL_SUCCESS != ((r) = opal_pmix.get((p), (s), NULL, &(_kv)))) { \
172-
*(d) = NULL; \
173-
} else { \
169+
if (OPAL_SUCCESS == ((r) = opal_pmix.get((p), (s), NULL, &(_kv)))) { \
174170
(r) = opal_value_unload(_kv, (void**)(d), (t)); \
175171
OBJ_RELEASE(_kv); \
176172
} \
@@ -203,9 +199,6 @@ extern int opal_pmix_base_exchange(opal_value_t *info,
203199
*(sz) = _kv->data.bo.size; \
204200
_kv->data.bo.bytes = NULL; /* protect the data */ \
205201
OBJ_RELEASE(_kv); \
206-
} else { \
207-
*(d) = NULL; \
208-
*(sz) = 0; \
209202
} \
210203
} while(0);
211204

0 commit comments

Comments
 (0)