[FFmpeg-cvslog] tcp: Explicitly convert a pointer to a boolean integer
Martin Storsjö
git at videolan.org
Tue Sep 10 10:07:31 CEST 2013
ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Mon Sep 9 11:28:14 2013 +0300| [a6a4596e12192375e1d9dffeae24d6d4c41b25c1] | committer: Martin Storsjö
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 at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a6a4596e12192375e1d9dffeae24d6d4c41b25c1
---
libavformat/tcp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/tcp.c b/libavformat/tcp.c
index 39065aa..cbd5142 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;
More information about the ffmpeg-cvslog
mailing list