Repository : ssh://git@open-mesh.org/batman-adv
On branch : master
commit ccf0eec672598a613a18bb4cdadfde4a1ac539c5 Author: Antonio Quartulli ordex@autistici.org Date: Mon Aug 27 09:35:54 2012 +0200
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
ccf0eec672598a613a18bb4cdadfde4a1ac539c5 translation-table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/translation-table.c b/translation-table.c index 0ac39d5..c61209f 100644 --- a/translation-table.c +++ b/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;