]> www.infradead.org Git - users/dwmw2/linux.git/commit
tty: rfcomm: prefer array indexing over pointer arithmetic
authorErick Archer <erick.archer@outlook.com>
Fri, 17 May 2024 17:21:50 +0000 (19:21 +0200)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 15 Jul 2024 01:33:32 +0000 (21:33 -0400)
commitb1c7cd6caaf6209ed9f7df59b61a2ac885eb79b3
tree82bf2e663efaef8e3bb85aa5061e53d3bf7599e9
parent7d2c7ddba6238e6a14cd89ef869878dd22f2a661
tty: rfcomm: prefer array indexing over pointer arithmetic

Refactor the list_for_each_entry() loop of rfcomm_get_dev_list()
function to use array indexing instead of pointer arithmetic.

This way, the code is more readable and idiomatic.

Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Erick Archer <erick.archer@outlook.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/rfcomm/tty.c