On Tue, May 28, 2013 at 03:25:49PM +0800, Marek Lindner wrote:
On Tuesday, May 28, 2013 03:43:01 Antonio Quartulli wrote:
+/**
- batadv_tt_entries - compute the number of entries fitting in tt_len
bytes + * @tt_len: available space
- Return the number of entries.
- */
+static uint16_t batadv_tt_entries(uint16_t tt_len) +{
return tt_len / sizeof(struct batadv_tvlv_tt_change);
+}
For the sake of consistency, wouldn't it be better to call batadv_tt_len(1) instead of sizeof(struct batadv_tvlv_tt_change) ?
mh..yes ok. In this way if we have to change it in the future we need to change one function only.
Cheers,