Repository : ssh://git@open-mesh.org/batman-adv
On branch : next
commit 7f05664526b213452f2d1bc8f2e120899752f15d Author: Antonio Quartulli ordex@autistici.org Date: Mon Nov 12 20:48:21 2012 +0100
batman-adv: remove useless !! when converting to bool
In C standard any expression different from 0 will be converted to 'true' when casting to bool (whatever is the length of the value). Therefore the "!!" conversion can be removed.
This was introduced by 3fbd7ac8c71b3778c5751b3d096ea36f96ef534e ("batman-adv: substitute tt_poss_change with a per-tt_entry flag")
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
7f05664526b213452f2d1bc8f2e120899752f15d translation-table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/translation-table.c b/translation-table.c index f02e5a1..22457a7 100644 --- a/translation-table.c +++ b/translation-table.c @@ -2545,7 +2545,7 @@ bool batadv_tt_local_client_is_roaming(struct batadv_priv *bat_priv, if (!tt_local_entry) goto out;
- ret = !!(tt_local_entry->common.flags & BATADV_TT_CLIENT_ROAM); + ret = tt_local_entry->common.flags & BATADV_TT_CLIENT_ROAM; batadv_tt_local_entry_free_ref(tt_local_entry); out: return ret;