[U-Boot] [PATCH 1/5] sandbox: eth-raw: Correct valid socket test in send/recv

Simon Glass sjg at chromium.org
Tue Jun 26 23:18:18 UTC 2018


On 26 June 2018 at 14:19, Joe Hershberger <joe.hershberger at ni.com> wrote:
> In open, the socket is correctly checked to be -1 in the error case.
> In send and recv, we checked for 0, but that is a valid socket number.
>
> Correct this by checking for -1 as a bad socket everywhere.
>
> Signed-off-by: Joe Hershberger <joe.hershberger at ni.com>
> ---
>
>  arch/sandbox/cpu/eth-raw-os.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list