Skip to content
Commit d61dcf2f authored by Luca Fancellu's avatar Luca Fancellu Committed by Carles Cufí
Browse files

net: zperf: improve code quality for tcp_received function



Currently, in tcp_received function defined in zperf_tcp_receiver
module, the assignment of session->state to STATE_COMPLETED is
overwritten on the same path to STATE_NULL and a session is
considered free for both STATE_COMPLETED and STATE_NULL, so remove
the assignment to STATE_NULL.
Remove the break from the STATE_COMPLETED case handling so that it
can fallthrough, in case the same session is used after finish.
Remove also the STATE_LAST_PACKET_RECEIVED case because this state
is never reached.

Signed-off-by: default avatarLuca Fancellu <luca.fancellu@arm.com>
parent 7c4ea08d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment