aboutsummaryrefslogtreecommitdiff
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
parent1aba4be97eb01b650d146c7f01dc961d55da62ab (diff)
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>
-rw-r--r--net/socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/socket.c b/net/socket.c
index fb21e20a54..ca4b8ba2b3 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;