summaryrefslogtreecommitdiffstats
path: root/net/batman-adv
diff options
context:
space:
mode:
authorMarek Lindner <lindner_marek@yahoo.de>2011-07-29 18:31:38 +0200
committerMarek Lindner <lindner_marek@yahoo.de>2011-08-22 15:16:22 +0200
commit267151cdfd17c9dd3923c8ed75ef03725cbdd539 (patch)
tree8e16a93e4a5e90b9ee5f69e391221f0b74c965a0 /net/batman-adv
parentdf6edb9e69cdb29b31b27305f60bb400dd5d91ed (diff)
batman-adv: reuse tt_len() to calculate tt buffer length
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Acked-by: Antonio Quartulli <ordex@autistici.org>
Diffstat (limited to 'net/batman-adv')
-rw-r--r--net/batman-adv/aggregation.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/batman-adv/aggregation.h b/net/batman-adv/aggregation.h
index 216337bb841..df4a5a94308 100644
--- a/net/batman-adv/aggregation.h
+++ b/net/batman-adv/aggregation.h
@@ -28,8 +28,7 @@
static inline int aggregated_packet(int buff_pos, int packet_len,
int tt_num_changes)
{
- int next_buff_pos = buff_pos + BAT_PACKET_LEN + (tt_num_changes *
- sizeof(struct tt_change));
+ int next_buff_pos = buff_pos + BAT_PACKET_LEN + tt_len(tt_num_changes);
return (next_buff_pos <= packet_len) &&
(next_buff_pos <= MAX_AGGREGATION_BYTES);