Skip to content
Commit 1100393b authored by Pisit Sawangvonganan's avatar Pisit Sawangvonganan Committed by Anas Nashif
Browse files

net: lwm2m: optimize `socket_loop` by using local variables



Changes include:
- Introducing a local `ctx` variable to replace multiple
  `sock_ctx[i]` references.
- Using a local `revents` variable to simplify repeated
  `sock_fds[i].revents` checks.
- Consolidating conditional checks for socket events
  (ZSOCK_POLLERR, ZSOCK_POLLNVAL, and ZSOCK_POLLHUP) as they are
  individual bit definitions, allowing them to be checked simultaneously.

Signed-off-by: default avatarPisit Sawangvonganan <pisit@ndrsolution.com>
parent 20dee1a6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment