diff options
author | Corentin Chary <corentincj@iksaif.net> | 2011-02-24 23:47:08 +0100 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2011-02-25 17:19:02 +0000 |
commit | 04483e150d412f5861a00c30581df7ba90a816e7 (patch) | |
tree | ed7433377a3bdadab6f7f3511c6035491f49b7b8 | |
parent | 89d2d3af518879ddfca367e56627229a09e90352 (diff) |
bitops: fix test_and_change_bit()
./bitops.h:192: warning: ‘old’ is used uninitialized in this function
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
-rw-r--r-- | bitops.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -187,7 +187,7 @@ static inline int test_and_change_bit(int nr, volatile unsigned long *addr) { unsigned long mask = BIT_MASK(nr); unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); - unsigned long old; + unsigned long old = *p; *p = old ^ mask; return (old & mask) != 0; |