Skip to content

Commit 013aec8

Browse files
committed
opal/class/opal_lifo: rename a local variable initially called new
this file is now indirectly included from C++, and new is a reserved C++ keyword
1 parent c749d7d commit 013aec8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

opal/class/opal_lifo.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* Copyright (c) 2010 IBM Corporation. All rights reserved.
1515
* Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights
1616
* reseved.
17+
* Copyright (c) 2016 Research Organization for Information Science
18+
* and Technology (RIST). All rights reserved.
1719
* $COPYRIGHT$
1820
*
1921
* Additional copyrights may follow
@@ -66,8 +68,8 @@ typedef union opal_counted_pointer_t opal_counted_pointer_t;
6668
static inline bool opal_update_counted_pointer (volatile opal_counted_pointer_t *addr, opal_counted_pointer_t old,
6769
opal_list_item_t *item)
6870
{
69-
opal_counted_pointer_t new = {.data = {.item = item, .counter = old.data.counter + 1}};
70-
return opal_atomic_cmpset_128 (&addr->value, old.value, new.value);
71+
opal_counted_pointer_t new_p = {.data = {.item = item, .counter = old.data.counter + 1}};
72+
return opal_atomic_cmpset_128 (&addr->value, old.value, new_p.value);
7173
}
7274

7375
#endif

0 commit comments

Comments
 (0)