samples: net: sockets: echo-client: fix sock fd test, allow zero.
Per: http://pubs.opengroup.org/onlinepubs/009695399/functions/socket.html "Upon successful completion, socket() shall return a non-negative integer, the socket file descriptor." The test in prepare_fds() however fails if socket fd is zero (non-negative), which should be a valid value. This was found while testing the SimpleLink socket offload driver, which can return a zero-valued socket fd, per the POSIX spec. Signed-off-by:Gil Pitney <gil.pitney@linaro.org>
Loading
Please sign in to comment