aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/tcp.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2013-09-09 11:28:14 +0300
committerMartin Storsjö <martin@martin.st>2013-09-09 23:57:04 +0300
commita6a4596e12192375e1d9dffeae24d6d4c41b25c1 (patch)
tree421025c2c6a9702a53a0bdd05b145de77027cd7a /libavformat/tcp.c
parent26f027fba1c5ab482fa2488fbe0fa36c8bb33b69 (diff)
downloadffmpeg-a6a4596e12192375e1d9dffeae24d6d4c41b25c1.tar.gz
tcp: Explicitly convert a pointer to a boolean integer
This fixes warnings about making integers from pointers without a cast, and avoids the theoretical case where the lower 32 bits of the pointer would all be zero where the implicit cast wouldn't give the right result. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/tcp.c')
-rw-r--r--libavformat/tcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/tcp.c b/libavformat/tcp.c
index 39065aac7e..cbd51422a8 100644
--- a/libavformat/tcp.c
+++ b/libavformat/tcp.c
@@ -100,7 +100,7 @@ static int tcp_open(URLContext *h, const char *uri, int flags)
}
} else {
if ((ret = ff_listen_connect(fd, cur_ai->ai_addr, cur_ai->ai_addrlen,
- timeout * 100, h, cur_ai->ai_next)) < 0) {
+ timeout * 100, h, !!cur_ai->ai_next)) < 0) {
if (ret == AVERROR_EXIT)
goto fail1;