[linux-next] LinuxNextTracking branch, master, updated. next-20110825

batman at open-mesh.org batman at open-mesh.org
Thu Aug 25 11:25:05 CEST 2011


The following commit has been merged in the master branch:
commit 267151cdfd17c9dd3923c8ed75ef03725cbdd539
Author: Marek Lindner <lindner_marek at yahoo.de>
Date:   Fri Jul 29 18:31:38 2011 +0200

    batman-adv: reuse tt_len() to calculate tt buffer length
    
    Signed-off-by: Marek Lindner <lindner_marek at yahoo.de>
    Acked-by: Antonio Quartulli <ordex at autistici.org>

diff --git a/net/batman-adv/aggregation.h b/net/batman-adv/aggregation.h
index 216337b..df4a5a9 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);

-- 
LinuxNextTracking


More information about the linux-merge mailing list