Skip to content
Commit b2caa3b8 authored by Philippe Mathieu-Daudé's avatar Philippe Mathieu-Daudé Committed by Michael Tokarev
Browse files

net/eth: fix incorrect check of iov_to_buf() return value



So we have sizeof(struct in6_address) != sizeof(uintptr_t)
and Clang > Coverity on this, see 4555ca68 :)

net/eth.c:426:30: warning: The code calls sizeof() on a pointer type. This can produce an unexpected result
        return bytes_read == sizeof(dst_addr);
                             ^     ~~~~~~~~~~
net/eth.c:475:34: warning: The code calls sizeof() on a pointer type. This can produce an unexpected result
            return bytes_read == sizeof(src_addr);
                                 ^     ~~~~~~~~~~

Reported-by: Clang Static Analyzer
Signed-off-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: default avatarDmitry Fleytman <dmitry@daynix.com>
Signed-off-by: default avatarMichael Tokarev <mjt@tls.msk.ru>
parent 9f26f325
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment