aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/tcp.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2011-06-06 14:13:02 +0200
committerDiego Biurrun <diego@biurrun.de>2012-03-28 09:38:33 +0200
commita92be9b856bd11b081041c43c25d442028fe9a63 (patch)
tree32f852fdf904a30238c789e57510be710eaa7826 /libavformat/tcp.c
parent856c8e0a049dc7069b7504d3aaa48549c75852de (diff)
downloadffmpeg-a92be9b856bd11b081041c43c25d442028fe9a63.tar.gz
Replace memset(0) by zero initializations.
Also remove one pointless zero initialization in rangecoder.c.
Diffstat (limited to 'libavformat/tcp.c')
-rw-r--r--libavformat/tcp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/tcp.c b/libavformat/tcp.c
index fdb457e8c5..0ed11f321f 100644
--- a/libavformat/tcp.c
+++ b/libavformat/tcp.c
@@ -37,7 +37,7 @@ typedef struct TCPContext {
/* return non zero if error */
static int tcp_open(URLContext *h, const char *uri, int flags)
{
- struct addrinfo hints, *ai, *cur_ai;
+ struct addrinfo hints = { 0 }, *ai, *cur_ai;
int port, fd = -1;
TCPContext *s = h->priv_data;
int listen_socket = 0;
@@ -62,7 +62,6 @@ static int tcp_open(URLContext *h, const char *uri, int flags)
timeout = strtol(buf, NULL, 10);
}
}
- memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
snprintf(portstr, sizeof(portstr), "%d", port);