Skip to content

Commit

Permalink
batman-adv: create a common substructure for tt_global/local_entry
Browse files Browse the repository at this point in the history
Several functions in the translation table management code assume that the
tt_global_entry and tt_local_entry structures have the same initial fields such
as 'addr' and 'hash_entry'. To improve the code readability and to avoid
mistakes in later changes, a common substructure that substitute the shared
fields has been introduced (struct tt_common_entry).

Thanks to this modification, it has also been possible to slightly reduce the
code length by merging some functions like compare_ltt/gtt() and
tt_local/global_hash_find()

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
  • Loading branch information
Antonio Quartulli authored and Sven Eckelmann committed Nov 20, 2011
1 parent ad24431 commit 48100ba
Show file tree
Hide file tree
Showing 3 changed files with 167 additions and 140 deletions.
Loading

0 comments on commit 48100ba

Please sign in to comment.