diff options
author | Markus Pargmann <mpa@pengutronix.de> | 2014-12-26 06:41:32 -0500 |
---|---|---|
committer | Antonio Quartulli <antonio@meshcoding.com> | 2015-06-03 04:58:30 -0400 |
commit | 564891510eb139dd073a0f1a5a7f5641b5bcc238 (patch) | |
tree | 50cd114b27f020cc6b0b6014fc00c40be515a689 /net/batman-adv/bat_iv_ogm.c | |
parent | 940d156f52d27c16f3e0890e82974d500e40e64f (diff) |
batman-adv: iv_ogm_queue_add, Simplify expressions
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Diffstat (limited to 'net/batman-adv/bat_iv_ogm.c')
-rw-r--r-- | net/batman-adv/bat_iv_ogm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c index 190a64299090..159f30af1dc3 100644 --- a/net/batman-adv/bat_iv_ogm.c +++ b/net/batman-adv/bat_iv_ogm.c | |||
@@ -750,13 +750,13 @@ static void batadv_iv_ogm_queue_add(struct batadv_priv *bat_priv, | |||
750 | unsigned long max_aggregation_jiffies; | 750 | unsigned long max_aggregation_jiffies; |
751 | 751 | ||
752 | batadv_ogm_packet = (struct batadv_ogm_packet *)packet_buff; | 752 | batadv_ogm_packet = (struct batadv_ogm_packet *)packet_buff; |
753 | direct_link = batadv_ogm_packet->flags & BATADV_DIRECTLINK ? 1 : 0; | 753 | direct_link = !!(batadv_ogm_packet->flags & BATADV_DIRECTLINK); |
754 | max_aggregation_jiffies = msecs_to_jiffies(BATADV_MAX_AGGREGATION_MS); | 754 | max_aggregation_jiffies = msecs_to_jiffies(BATADV_MAX_AGGREGATION_MS); |
755 | 755 | ||
756 | /* find position for the packet in the forward queue */ | 756 | /* find position for the packet in the forward queue */ |
757 | spin_lock_bh(&bat_priv->forw_bat_list_lock); | 757 | spin_lock_bh(&bat_priv->forw_bat_list_lock); |
758 | /* own packets are not to be aggregated */ | 758 | /* own packets are not to be aggregated */ |
759 | if ((atomic_read(&bat_priv->aggregated_ogms)) && (!own_packet)) { | 759 | if (atomic_read(&bat_priv->aggregated_ogms) && !own_packet) { |
760 | hlist_for_each_entry(forw_packet_pos, | 760 | hlist_for_each_entry(forw_packet_pos, |
761 | &bat_priv->forw_bat_list, list) { | 761 | &bat_priv->forw_bat_list, list) { |
762 | if (batadv_iv_ogm_can_aggregate(batadv_ogm_packet, | 762 | if (batadv_iv_ogm_can_aggregate(batadv_ogm_packet, |