aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorzhanghailiang <zhang.zhanghailiang@huawei.com>2014-11-17 13:54:05 +0800
committerStefan Hajnoczi <stefanha@redhat.com>2014-11-18 15:04:35 +0000
commited6273e26fdfb94a282dbbf1234a75422c6b4c4b (patch)
tree6cb9958f66858d3ffa605d73584698a6dc66b09c /net
parent1aba4be97eb01b650d146c7f01dc961d55da62ab (diff)
downloadqemu-ed6273e26fdfb94a282dbbf1234a75422c6b4c4b.zip
qemu-ed6273e26fdfb94a282dbbf1234a75422c6b4c4b.tar.gz
qemu-ed6273e26fdfb94a282dbbf1234a75422c6b4c4b.tar.bz2
net: The third parameter of getsockname should be initialized
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'net')
-rw-r--r--net/socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/socket.c b/net/socket.c
index fb21e20..ca4b8ba 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -352,7 +352,7 @@ static NetSocketState *net_socket_fd_init_dgram(NetClientState *peer,
{
struct sockaddr_in saddr;
int newfd;
- socklen_t saddr_len;
+ socklen_t saddr_len = sizeof(saddr);
NetClientState *nc;
NetSocketState *s;