From a6a4596e12192375e1d9dffeae24d6d4c41b25c1 Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Mon, 9 Sep 2013 11:28:14 +0300 Subject: tcp: Explicitly convert a pointer to a boolean integer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ö --- libavformat/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat/tcp.c') 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; -- cgit v1.2.3