summaryrefslogtreecommitdiffstats
path: root/libavformat/udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/udp.c')
-rw-r--r--libavformat/udp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/udp.c b/libavformat/udp.c
index 37b7655..6571ab5 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;
OpenPOWER on IntegriCloud