]> git.tuebingen.mpg.de Git - paraslash.git/commit
net: Always initialize struct sockaddr_storage.
authorAndre Noll <maan@tuebingen.mpg.de>
Fri, 21 Apr 2017 20:04:09 +0000 (22:04 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Fri, 21 Apr 2017 20:58:10 +0000 (22:58 +0200)
commit63128eead92c4e07559b222e2d3d0999be8c82ff
tree20ef8e32771b102d62e5f372e3b363825bdf3855
parent1b9bf429a91f4c9fc1abc6030b02ca0c7739bca8
net: Always initialize struct sockaddr_storage.

The static analyzer of clang claims that the left operand of the condition

ss->ss_family == AF_INET6 && IN6_IS_ADDR_V4MAPPED(&ia6->sin6_addr);

in SS_IS_ADDR_V4MAPPED() is a garbage value. The code has been like
this for seven years without problems, so the warning is probably
bogus.

It does not hurt to initialize the sockaddr_storage structures though,
which silences the warning.
net.c