From a92be9b856bd11b081041c43c25d442028fe9a63 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Mon, 6 Jun 2011 14:13:02 +0200 Subject: Replace memset(0) by zero initializations. Also remove one pointless zero initialization in rangecoder.c. --- libavformat/udp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libavformat/udp.c') diff --git a/libavformat/udp.c b/libavformat/udp.c index 37b76559e9..6571ab5d42 100644 --- a/libavformat/udp.c +++ b/libavformat/udp.c @@ -140,7 +140,7 @@ static int udp_leave_multicast_group(int sockfd, struct sockaddr *addr) static struct addrinfo* udp_resolve_host(const char *hostname, int port, int type, int family, int flags) { - struct addrinfo hints, *res = 0; + struct addrinfo hints = { 0 }, *res = 0; int error; char sport[16]; const char *node = 0, *service = "0"; @@ -152,7 +152,6 @@ static struct addrinfo* udp_resolve_host(const char *hostname, int port, if ((hostname) && (hostname[0] != '\0') && (hostname[0] != '?')) { node = hostname; } - memset(&hints, 0, sizeof(hints)); hints.ai_socktype = type; hints.ai_family = family; hints.ai_flags = flags; -- cgit v1.2.3