Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9f9ff08d authored by Antonio Quartulli's avatar Antonio Quartulli
Browse files

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: default avatarAntonio Quartulli <ordex@autistici.org>
parent b8fcfa42
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;