diff options
author | Alasdair Kergon <agk@redhat.com> | 2006-01-31 14:50:38 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2006-01-31 14:50:38 +0000 |
commit | 5e3bd86778673cfe316ff57bb358b08f7aa3e476 (patch) | |
tree | 761d7b6d6c1aff04eb88ba1a44c73f90f7098887 /libdm/datastruct | |
parent | c55b141005e4b0354267b77d9c52bde5d5a8d9cb (diff) | |
download | lvm2-5e3bd86778673cfe316ff57bb358b08f7aa3e476.tar.gz |
Rename _log to dm_log and export.
Fix misc compile-time warnings.
Diffstat (limited to 'libdm/datastruct')
-rw-r--r-- | libdm/datastruct/bitset.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libdm/datastruct/bitset.c b/libdm/datastruct/bitset.c index bb05e5e86..060481fbc 100644 --- a/libdm/datastruct/bitset.c +++ b/libdm/datastruct/bitset.c @@ -57,7 +57,7 @@ void dm_bit_union(dm_bitset_t out, dm_bitset_t in1, dm_bitset_t in2) */ static inline int _test_word(uint32_t test, int bit) { - while (bit < DM_BITS_PER_INT) { + while (bit < (int) DM_BITS_PER_INT) { if (test & (0x1 << bit)) return bit; bit++; @@ -73,7 +73,10 @@ int dm_bit_get_next(dm_bitset_t bs, int last_bit) last_bit++; /* otherwise we'll return the same bit again */ - while (last_bit < bs[0]) { + /* + * bs[0] holds number of bits + */ + while (last_bit < (int) bs[0]) { word = last_bit >> INT_SHIFT; test = bs[word + 1]; bit = last_bit & (DM_BITS_PER_INT - 1); |