diff options
author | Antonio Quartulli <ordex@autistici.org> | 2013-01-15 22:17:19 +1000 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2013-03-13 22:53:48 +0100 |
commit | c1d07431b9f7fe3c5eb372f3a35d7cd7a18c3b15 (patch) | |
tree | f50b0439743d4c59e030902e2f5a4d8c4e198ba0 /net/batman-adv/translation-table.c | |
parent | f86ce0ad107bc0e33ead8ba2498fc22dfb747479 (diff) | |
download | linux-c1d07431b9f7fe3c5eb372f3a35d7cd7a18c3b15.tar.gz linux-c1d07431b9f7fe3c5eb372f3a35d7cd7a18c3b15.tar.bz2 linux-c1d07431b9f7fe3c5eb372f3a35d7cd7a18c3b15.zip |
batman-adv: don't use !! in bool conversion
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 all the "!!" conversions can be removed.
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to 'net/batman-adv/translation-table.c')
-rw-r--r-- | net/batman-adv/translation-table.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index 7e9e264cb4df..932232087449 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c @@ -902,7 +902,7 @@ out_remove: /* remove address from local hash if present */ local_flags = batadv_tt_local_remove(bat_priv, tt_addr, "global tt received", - !!(flags & BATADV_TT_CLIENT_ROAM)); + flags & BATADV_TT_CLIENT_ROAM); tt_global_entry->common.flags |= local_flags & BATADV_TT_CLIENT_WIFI; if (!(flags & BATADV_TT_CLIENT_ROAM)) @@ -2515,7 +2515,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; |