mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
gdbsx: clear sockaddr before using it
...so that sin_zero is actually zero. Coverity-ID: 1056070 Signed-off-by: Matthew Daley <mattjd@gmail.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
1 parent
6ea4840923
commit
6c1bfef445
1 file changed
+1
@@ -84,6 +84,7 @@ do_tcp(char *port_str)
|
||||
tmp = 1;
|
||||
setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, (char *)&tmp,sizeof(tmp));
|
||||
|
||||
memset(&sockaddr, 0, sizeof(sockaddr));
|
||||
sockaddr.sin_family = PF_INET;
|
||||
sockaddr.sin_port = htons (port);
|
||||
sockaddr.sin_addr.s_addr = INADDR_ANY;
|
||||
|
||||