mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-13 07:31:07 +00:00
batman-adv: tt: replace forward gotos in batadv_tt_local_add()
batadv_tt_local_add() used two labels in the middle of the function to express which parts of the common tail have to be executed: "add_event" to announce a (re-)added client and "check_roaming" to skip that announcement. Jumping forward into the middle of a function makes it hard to see which path ends up sending an ADD event. Especially since the PENDING branch reached "add_event" while the branch right below it reached "check_roaming" instead. Express the same in an "added" variable and turn the two client cases into a plain if/else. The PENDING check returned early before the ROAM check could run, so it becomes an "else if". Signed-off-by: Sven Eckelmann <sven@narfation.org>
This commit is contained in:
parent
defa87f5ce
commit
a5e5d2709d
1 changed files with 20 additions and 23 deletions
Loading…
Add table
Add a link
Reference in a new issue