projects
/
profile
/
ivi
/
kernel-x86-ivi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b8fcfa4
)
batman-adv: properly convert flag into a boolean value
author
Antonio Quartulli
<ordex@autistici.org>
Mon, 27 Aug 2012 07:35:54 +0000
(09:35 +0200)
committer
Antonio Quartulli
<ordex@autistici.org>
Mon, 29 Oct 2012 08:42:47 +0000
(09:42 +0100)
In order to properly convert a bitwise AND to a boolean value, the whole
expression must be prepended by "!!".
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
net/batman-adv/translation-table.c
patch
|
blob
|
history
diff --git
a/net/batman-adv/translation-table.c
b/net/batman-adv/translation-table.c
index
0ac39d5
..
c61209f
100644
(file)
--- a/
net/batman-adv/translation-table.c
+++ b/
net/batman-adv/translation-table.c
@@
-2420,7
+2420,7
@@
bool batadv_tt_global_client_is_roaming(struct batadv_priv *bat_priv,
if (!tt_global_entry)
goto out;
- ret =
tt_global_entry->common.flags & BATADV_TT_CLIENT_ROAM
;
+ ret =
!!(tt_global_entry->common.flags & BATADV_TT_CLIENT_ROAM)
;
batadv_tt_global_entry_free_ref(tt_global_entry);
out:
return ret;