Skip to content

Commit 7d538c6

Browse files
author
Ralph Castain
committed
Initialize variable and correctly compare against success
Signed-off-by: Ralph Castain <[email protected]>
1 parent 55a5d3a commit 7d538c6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

orte/tools/orte-dvm/orte-dvm.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ static void notify_requestor(int sd, short args, void *cbdata)
484484
{
485485
orte_state_caddy_t *caddy = (orte_state_caddy_t*)cbdata;
486486
orte_job_t *jdata = caddy->jdata;
487-
orte_proc_t *pptr;
487+
orte_proc_t *pptr=NULL;
488488
int ret;
489489
opal_buffer_t *reply;
490490
orte_daemon_cmd_flag_t command;
@@ -500,7 +500,7 @@ static void notify_requestor(int sd, short args, void *cbdata)
500500
} else if (orte_get_attribute(&jdata->attributes, ORTE_JOB_CANCELLED, NULL, OPAL_BOOL)) {
501501
ret = ORTE_ERR_JOB_CANCELLED;
502502
} else {
503-
ret = 0;
503+
ret = ORTE_SUCCESS;
504504
}
505505

506506
if (0 == ret && orte_get_attribute(&jdata->attributes, ORTE_JOB_SILENT_TERMINATION, NULL, OPAL_BOOL)) {
@@ -529,7 +529,7 @@ static void notify_requestor(int sd, short args, void *cbdata)
529529
val->data.status = ret;
530530
opal_list_append(info, &val->super);
531531
/* if there was a problem, we need to send the requestor more info about what happened */
532-
if (0 < ret) {
532+
if (ORTE_SUCCESS != ret) {
533533
val = OBJ_NEW(opal_value_t);
534534
val->key = strdup(OPAL_PMIX_PROCID);
535535
val->type = OPAL_NAME;

0 commit comments

Comments
 (0)