syscall: fix use of uninitialized values
commit6860710cc3864382a898c847d722f950b5e01a6e
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Thu, 27 Jul 2017 02:42:18 +0000 (26 23:42 -0300)
committerMichael Tokarev <mjt@tls.msk.ru>
Mon, 31 Jul 2017 10:06:39 +0000 (31 13:06 +0300)
tree0983297b681c27070cf7aedb84a4af648260486c
parentbc658e4a2e81593f75a3ae34b112be77efbb3e0a
syscall: fix use of uninitialized values

linux-user/syscall.c:1627:35: warning: 1st function call argument is an uninitialized value
        target_saddr->sa_family = tswap16(addr->sa_family);
                                  ^~~~~~~~~~~~~~~~~~~~~~~~
linux-user/syscall.c:1629:25: warning: The left operand of '==' is a garbage value
    if (addr->sa_family == AF_NETLINK && len >= sizeof(struct sockaddr_nl)) {
        ~~~~~~~~~~~~~~~ ^

Reported-by: Clang Static Analyzer
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
linux-user/syscall.c