Skip to content

Commit c03b3b1

Browse files
committed
Don't allow multiple pvar with the same pvar_index.
Fix Cisco copyright.
1 parent 98b6d65 commit c03b3b1

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

opal/mca/base/mca_base_pvar.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
/*
33
* Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights
44
* reserved.
5-
* Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
5+
* Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
66
* Copyright (c) 2015 Bull SAS. All rights reserved.
7+
* Copyright (c) 2015 The University of Tennessee and The University
8+
* of Tennessee Research Foundation. All rights
9+
* reserved.
710
* $COPYRIGHT$
811
*
912
* Additional copyrights may follow
@@ -296,8 +299,9 @@ int mca_base_pvar_register (const char *project, const char *framework, const ch
296299
break;
297300
}
298301

302+
pvar->pvar_index = pvar_count;
299303
opal_hash_table_set_value_ptr (&mca_base_pvar_index_hash, pvar->name, strlen (pvar->name),
300-
(void *)(uintptr_t) pvar_count);
304+
(void *)(uintptr_t) pvar->pvar_index);
301305

302306
pvar_count++;
303307
ret = OPAL_SUCCESS;
@@ -330,7 +334,6 @@ int mca_base_pvar_register (const char *project, const char *framework, const ch
330334
}
331335

332336
pvar->ctx = ctx;
333-
pvar->pvar_index = pvar_count;
334337

335338
return pvar->pvar_index;
336339
}

0 commit comments

Comments
 (0)