diff options
author | Antonio Quartulli <ordex@autistici.org> | 2012-08-27 09:35:54 +0200 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-10-29 09:42:47 +0100 |
commit | 9f9ff08d26b2f6ecea7900a9c9543c627cd95e56 (patch) | |
tree | cac0705d0e8b2fcd578c5b18a7dd1f17a654457f /net | |
parent | b8fcfa42e4ec5d55d4cccd5c728415e8bca0539d (diff) | |
download | blackbird-op-linux-9f9ff08d26b2f6ecea7900a9c9543c627cd95e56.tar.gz blackbird-op-linux-9f9ff08d26b2f6ecea7900a9c9543c627cd95e56.zip |
batman-adv: properly convert flag into a boolean value
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/batman-adv/translation-table.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index 0ac39d5f77d8..c61209f764b1 100644 --- 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; |