]> Git Repo - qemu.git/blobdiff - util/hbitmap.c
target-arm: Override do_interrupt for ARMv7-M profile
[qemu.git] / util / hbitmap.c
index 2aa487db74b0b817fd54911c31933c7ce3a4807e..d93683128bd4f654f098bbebdf499bdb2bdb0edf 100644 (file)
@@ -126,7 +126,8 @@ unsigned long hbitmap_iter_skip_words(HBitmapIter *hbi)
          * The index of this word's least significant set bit provides
          * the low-order bits.
          */
-        pos = (pos << BITS_PER_LEVEL) + ffsl(cur) - 1;
+        assert(cur);
+        pos = (pos << BITS_PER_LEVEL) + ctzl(cur);
         hbi->cur[i] = cur & (cur - 1);
 
         /* Set up next level for iteration.  */
This page took 0.023571 seconds and 4 git commands to generate.