aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/translation-table.c
diff options
context:
space:
mode:
authorAntonio Quartulli <ordex@autistici.org>2012-08-27 03:35:54 -0400
committerAntonio Quartulli <ordex@autistici.org>2012-10-29 04:42:47 -0400
commit9f9ff08d26b2f6ecea7900a9c9543c627cd95e56 (patch)
treecac0705d0e8b2fcd578c5b18a7dd1f17a654457f /net/batman-adv/translation-table.c
parentb8fcfa42e4ec5d55d4cccd5c728415e8bca0539d (diff)
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/batman-adv/translation-table.c')
-rw-r--r--net/batman-adv/translation-table.c2
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,
2420 if (!tt_global_entry) 2420 if (!tt_global_entry)
2421 goto out; 2421 goto out;
2422 2422
2423 ret = tt_global_entry->common.flags & BATADV_TT_CLIENT_ROAM; 2423 ret = !!(tt_global_entry->common.flags & BATADV_TT_CLIENT_ROAM);
2424 batadv_tt_global_entry_free_ref(tt_global_entry); 2424 batadv_tt_global_entry_free_ref(tt_global_entry);
2425out: 2425out:
2426 return ret; 2426 return ret;