diff options
author | Markus Armbruster <armbru@redhat.com> | 2014-12-04 14:28:16 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2014-12-19 13:17:02 +0000 |
commit | 71e28e3cc24ff3b0268903758aae357592eb8b74 (patch) | |
tree | bd5f1d73c6c366506ba5107e6f5f9307b9e52853 /net | |
parent | 23120b13c6e316df44aeb63420121a1cf6dc49dc (diff) | |
download | qemu-71e28e3cc24ff3b0268903758aae357592eb8b74.zip qemu-71e28e3cc24ff3b0268903758aae357592eb8b74.tar.gz qemu-71e28e3cc24ff3b0268903758aae357592eb8b74.tar.bz2 |
net: Fuse g_malloc(); memset() into g_new0()
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/l2tpv3.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/l2tpv3.c b/net/l2tpv3.c index 3b805a7..6014c43 100644 --- a/net/l2tpv3.c +++ b/net/l2tpv3.c @@ -695,8 +695,7 @@ int net_init_l2tpv3(const NetClientOptions *opts, goto outerr; } - s->dgram_dst = g_malloc(sizeof(struct sockaddr_storage)); - memset(s->dgram_dst, '\0' , sizeof(struct sockaddr_storage)); + s->dgram_dst = g_new0(struct sockaddr_storage, 1); memcpy(s->dgram_dst, result->ai_addr, result->ai_addrlen); s->dst_size = result->ai_addrlen; |