Skip to content

Commit

Permalink
Merge pull request #2 from naota/fix-for_each_cpu
Browse files Browse the repository at this point in the history
helpers: fix for_each_cpu to use new attributes
  • Loading branch information
osandov authored Jun 5, 2019
2 parents 95a8d99 + 1691d5c commit ca9e641
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drgn/helpers/linux/cpumask.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ def for_each_cpu(mask):
:rtype: Iterator[int]
"""
bits = mask.bits
word_bits = 8 * bits.type_.type.sizeof()
for i in range(bits.type_.size):
word_bits = 8 * bits.type_.type.size
for i in range(bits.type_.length):
word = bits[i].value_()
for j in range(word_bits):
if word & (1 << j):
Expand Down

0 comments on commit ca9e641

Please sign in to comment.