diff options
author | Antonio Quartulli <ordex@autistici.org> | 2013-01-15 07:17:19 -0500 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2013-03-13 17:53:48 -0400 |
commit | c1d07431b9f7fe3c5eb372f3a35d7cd7a18c3b15 (patch) | |
tree | f50b0439743d4c59e030902e2f5a4d8c4e198ba0 /net/batman-adv/translation-table.c | |
parent | f86ce0ad107bc0e33ead8ba2498fc22dfb747479 (diff) |
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: | |||
902 | /* remove address from local hash if present */ | 902 | /* remove address from local hash if present */ |
903 | local_flags = batadv_tt_local_remove(bat_priv, tt_addr, | 903 | local_flags = batadv_tt_local_remove(bat_priv, tt_addr, |
904 | "global tt received", | 904 | "global tt received", |
905 | !!(flags & BATADV_TT_CLIENT_ROAM)); | 905 | flags & BATADV_TT_CLIENT_ROAM); |
906 | tt_global_entry->common.flags |= local_flags & BATADV_TT_CLIENT_WIFI; | 906 | tt_global_entry->common.flags |= local_flags & BATADV_TT_CLIENT_WIFI; |
907 | 907 | ||
908 | if (!(flags & BATADV_TT_CLIENT_ROAM)) | 908 | if (!(flags & BATADV_TT_CLIENT_ROAM)) |
@@ -2515,7 +2515,7 @@ bool batadv_tt_global_client_is_roaming(struct batadv_priv *bat_priv, | |||
2515 | if (!tt_global_entry) | 2515 | if (!tt_global_entry) |
2516 | goto out; | 2516 | goto out; |
2517 | 2517 | ||
2518 | ret = !!(tt_global_entry->common.flags & BATADV_TT_CLIENT_ROAM); | 2518 | ret = tt_global_entry->common.flags & BATADV_TT_CLIENT_ROAM; |
2519 | batadv_tt_global_entry_free_ref(tt_global_entry); | 2519 | batadv_tt_global_entry_free_ref(tt_global_entry); |
2520 | out: | 2520 | out: |
2521 | return ret; | 2521 | return ret; |