diff options
author | Sven Eckelmann <sven@narfation.org> | 2012-07-08 12:33:51 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-08-23 08:20:21 -0400 |
commit | c67893d17a6bbd16328a1ee38ab0cb460511014a (patch) | |
tree | 4bf7c241b31200f0dfb2c0c41b2852b47d42921f /net/batman-adv/vis.c | |
parent | bbb1f90efba89b31fc5e329d5fcaf10aca99212b (diff) |
batman-adv: Reduce accumulated length of simple statements
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Diffstat (limited to 'net/batman-adv/vis.c')
-rw-r--r-- | net/batman-adv/vis.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/batman-adv/vis.c b/net/batman-adv/vis.c index 55cc51bcc11..5abd1454fb0 100644 --- a/net/batman-adv/vis.c +++ b/net/batman-adv/vis.c | |||
@@ -578,6 +578,7 @@ static int batadv_generate_vis_packet(struct batadv_priv *bat_priv) | |||
578 | struct batadv_vis_packet *packet; | 578 | struct batadv_vis_packet *packet; |
579 | struct batadv_vis_info_entry *entry; | 579 | struct batadv_vis_info_entry *entry; |
580 | struct batadv_tt_common_entry *tt_common_entry; | 580 | struct batadv_tt_common_entry *tt_common_entry; |
581 | uint8_t *packet_pos; | ||
581 | int best_tq = -1; | 582 | int best_tq = -1; |
582 | uint32_t i; | 583 | uint32_t i; |
583 | 584 | ||
@@ -618,8 +619,8 @@ static int batadv_generate_vis_packet(struct batadv_priv *bat_priv) | |||
618 | goto next; | 619 | goto next; |
619 | 620 | ||
620 | /* fill one entry into buffer. */ | 621 | /* fill one entry into buffer. */ |
621 | entry = (struct batadv_vis_info_entry *) | 622 | packet_pos = skb_put(info->skb_packet, sizeof(*entry)); |
622 | skb_put(info->skb_packet, sizeof(*entry)); | 623 | entry = (struct batadv_vis_info_entry *)packet_pos; |
623 | memcpy(entry->src, | 624 | memcpy(entry->src, |
624 | router->if_incoming->net_dev->dev_addr, | 625 | router->if_incoming->net_dev->dev_addr, |
625 | ETH_ALEN); | 626 | ETH_ALEN); |
@@ -644,9 +645,8 @@ next: | |||
644 | rcu_read_lock(); | 645 | rcu_read_lock(); |
645 | hlist_for_each_entry_rcu(tt_common_entry, node, head, | 646 | hlist_for_each_entry_rcu(tt_common_entry, node, head, |
646 | hash_entry) { | 647 | hash_entry) { |
647 | entry = (struct batadv_vis_info_entry *) | 648 | packet_pos = skb_put(info->skb_packet, sizeof(*entry)); |
648 | skb_put(info->skb_packet, | 649 | entry = (struct batadv_vis_info_entry *)packet_pos; |
649 | sizeof(*entry)); | ||
650 | memset(entry->src, 0, ETH_ALEN); | 650 | memset(entry->src, 0, ETH_ALEN); |
651 | memcpy(entry->dest, tt_common_entry->addr, ETH_ALEN); | 651 | memcpy(entry->dest, tt_common_entry->addr, ETH_ALEN); |
652 | entry->quality = 0; /* 0 means TT */ | 652 | entry->quality = 0; /* 0 means TT */ |