[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1b1-92-gf1dcc58
mysql vizuser
noreply at mpich.org
Thu Oct 17 09:01:35 CDT 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via f1dcc582269b1b1f600716f900eafbdd2e220e1e (commit)
from da5d55417f26f263d7c94233fce0c25d68e2c26d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/f1dcc582269b1b1f600716f900eafbdd2e220e1e
commit f1dcc582269b1b1f600716f900eafbdd2e220e1e
Author: Jan Bierbaum <jan.bierbaum at tudos.org>
Date: Mon Oct 14 10:39:16 2013 +0200
fix check for duplicate KVS entries
Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>
diff --git a/src/pm/hydra/pm/pmiserv/common.c b/src/pm/hydra/pm/pmiserv/common.c
index 6cb3a20..2fd99ef 100644
--- a/src/pm/hydra/pm/pmiserv/common.c
+++ b/src/pm/hydra/pm/pmiserv/common.c
@@ -155,7 +155,7 @@ void HYD_pmcd_free_pmi_kvs_list(struct HYD_pmcd_pmi_kvs *kvs_list)
HYD_status HYD_pmcd_pmi_add_kvs(const char *key, char *val, struct HYD_pmcd_pmi_kvs *kvs, int *ret)
{
- struct HYD_pmcd_pmi_kvs_pair *key_pair, *run;
+ struct HYD_pmcd_pmi_kvs_pair *key_pair, *run, *last;
HYD_status status = HYD_SUCCESS;
HYDU_FUNC_ENTER();
@@ -172,16 +172,16 @@ HYD_status HYD_pmcd_pmi_add_kvs(const char *key, char *val, struct HYD_pmcd_pmi_
kvs->key_pair = key_pair;
}
else {
- run = kvs->key_pair;
- while (run->next) {
+ for (run = kvs->key_pair; run; run = run->next) {
if (!strcmp(run->key, key_pair->key)) {
/* duplicate key found */
*ret = -1;
- break;
+ goto fn_fail;
}
- run = run->next;
+ last = run;
}
- run->next = key_pair;
+ /* Add key_pair to end of list. */
+ last->next = key_pair;
}
fn_exit:
@@ -189,5 +189,6 @@ HYD_status HYD_pmcd_pmi_add_kvs(const char *key, char *val, struct HYD_pmcd_pmi_
return status;
fn_fail:
+ HYDU_FREE(key_pair);
goto fn_exit;
}
-----------------------------------------------------------------------
Summary of changes:
src/pm/hydra/pm/pmiserv/common.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
hooks/post-receive
--
MPICH primary repository
More information about the commits
mailing list