Skip to content
Snippets Groups Projects
Commit 8f839fbc authored by Francois Berder's avatar Francois Berder
Browse files

posix: sockets: address was not set in recvfrom


The address is an optional parameter of recvfrom. If it is
not null, recvfrom must store the address of the sender.
However this was only allowed if res was equal to 0, which
is wrong since res contains the number of bytes received
or -1.
This commit ensures that the address is set only if no
previous errors happened before.

Signed-off-by: default avatarFrancois Berder <francois.berder@imgtec.com>
parent 2936a69a
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment