Skip to content

Commit 2865124

Browse files
committed
pmix/ext1x: fix index handling when populating an info array
Signed-off-by: Gilles Gouaillardet <[email protected]> (back-ported from commit edb8fe8)
1 parent 84b6d72 commit 2865124

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

opal/mca/pmix/ext1x/pmix1x_client.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
22
/*
33
* Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
4-
* Copyright (c) 2014-2017 Research Organization for Information Science
4+
* Copyright (c) 2014-2018 Research Organization for Information Science
55
* and Technology (RIST). All rights reserved.
66
* Copyright (c) 2014-2015 Mellanox Technologies, Inc.
77
* All rights reserved.
@@ -711,7 +711,7 @@ int pmix1_lookup(opal_list_t *data, opal_list_t *info)
711711
PMIX_INFO_CREATE(pinfo, ninfo);
712712
n=0;
713713
OPAL_LIST_FOREACH(iptr, info, opal_value_t) {
714-
(void)strncpy(pinfo[n++].key, iptr->key, PMIX_MAX_KEYLEN);
714+
(void)strncpy(pinfo[n].key, iptr->key, PMIX_MAX_KEYLEN);
715715
pmix1_value_load(&pinfo[n].value, iptr);
716716
++n;
717717
}
@@ -881,7 +881,7 @@ int pmix1_unpublish(char **keys, opal_list_t *info)
881881
PMIX_INFO_CREATE(pinfo, ninfo);
882882
n=0;
883883
OPAL_LIST_FOREACH(iptr, info, opal_value_t) {
884-
(void)strncpy(pinfo[n++].key, iptr->key, PMIX_MAX_KEYLEN);
884+
(void)strncpy(pinfo[n].key, iptr->key, PMIX_MAX_KEYLEN);
885885
pmix1_value_load(&pinfo[n].value, iptr);
886886
++n;
887887
}

0 commit comments

Comments
 (0)