batman-adv: tt: replace open-coded overflow check with helper

The commit 6043a632dd06 ("batman-adv: reject oversized global TT response
buffers") introduced an open-coded check to ensure that the allocated
buffer size can be stored in a u16. The check_add_overflow() helper can
perform the addition and overflow check in one step, so use that instead.

Acked-by: Antonio Quartulli <antonio@mandelbit.com>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
This commit is contained in:
Sven Eckelmann 2026-05-03 22:46:15 +02:00
commit 5ffd4dd874
No known key found for this signature in database
GPG key ID: 4D0F772BD314F5CB