batman-adv: create a common substructure for tt_global/local_entry
authorAntonio Quartulli <ordex@autistici.org>
Sun, 30 Oct 2011 11:17:33 +0000 (12:17 +0100)
committerSven Eckelmann <sven@narfation.org>
Sun, 20 Nov 2011 12:08:35 +0000 (13:08 +0100)
commit48100bac89a6161ca53dd65697fe635f77986686
tree369c12a754d2771d1b1fcc11a258b4e9de6567bd
parentad24431277fc92717084d5b4c451e15982588206
batman-adv: create a common substructure for tt_global/local_entry

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>
net/batman-adv/translation-table.c
net/batman-adv/types.h
net/batman-adv/vis.c