projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
89d2d3a
)
bitops: fix test_and_change_bit()
author
Corentin Chary
<corentincj@iksaif.net>
Thu, 24 Feb 2011 22:47:08 +0000
(23:47 +0100)
committer
Blue Swirl
<blauwirbel@gmail.com>
Fri, 25 Feb 2011 17:19:02 +0000
(17:19 +0000)
./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>
bitops.h
patch
|
blob
|
history
diff --git
a/bitops.h
b/bitops.h
index ae7bcb1b1c00d3284ec6deea0f920467ee90b91b..e2b9df3155029110a34af806122f56d869965df0 100644
(file)
--- a/
bitops.h
+++ b/
bitops.h
@@
-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;