Skip to content

Commit

Permalink
batman-adv: remove packed from batadv_ogm_packet
Browse files Browse the repository at this point in the history
As we decreased the struct size from 26 to 24 byte, we can remove
__packed as the compiler will not add any more padding.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
  • Loading branch information
Simon Wunderlich authored and Antonio Quartulli committed Oct 9, 2013
1 parent a1f1ac5 commit 9284a47
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion net/batman-adv/packet.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,10 @@ struct batadv_ogm_packet {
uint8_t reserved;
uint8_t tq;
__be16 tvlv_len;
} __packed;
/* __packed is not needed as the struct size is divisible by 4,
* and the largest data type in this struct has a size of 4.
*/
};

#define BATADV_OGM_HLEN sizeof(struct batadv_ogm_packet)

Expand Down

0 comments on commit 9284a47

Please sign in to comment.