Skip to content

Commit 4ebed21

Browse files
authored
Merge pull request #4670 from ggouaillardet/topic/opal_bitmap
opal/bitmap: fix opal_bitmap_set_bit()
2 parents 976cd5e + 125169f commit 4ebed21

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: opal/class/opal_bitmap.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
1313
* Copyright (c) 2010-2012 Oak Ridge National Labs. All rights reserved.
1414
* Copyright (c) 2014 Intel, Inc. All rights reserved.
15-
* Copyright (c) 2015 Research Organization for Information Science
15+
* Copyright (c) 2015-2017 Research Organization for Information Science
1616
* and Technology (RIST). All rights reserved.
1717
* $COPYRIGHT$
1818
*
@@ -123,7 +123,7 @@ opal_bitmap_set_bit(opal_bitmap_t *bm, int bit)
123123
out of range. We don't throw any error here, because this is
124124
valid and we simply expand the bitmap */
125125

126-
new_size = (int)(((size_t)index / bm->array_size + 1 ) * bm->array_size);
126+
new_size = index + 1;
127127
if( new_size > bm->max_size )
128128
new_size = bm->max_size;
129129

0 commit comments

Comments
 (0)