diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-08-16 00:43:27 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-08-16 15:58:40 +0200 |
commit | 7916053cedb4975faf54710d1edd5409b0ca5410 (patch) | |
tree | acde571c013151b6ea898285a5e07616bc67365a | |
parent | 0014541e9a2387a37b1a87c22caa36c525a0b478 (diff) | |
download | ffmpeg-7916053cedb4975faf54710d1edd5409b0ca5410.tar.gz |
avformat/udp: dont mix integers with pointers
Reviewed-by: James Darnley <james.darnley@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/udp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/udp.c b/libavformat/udp.c index a8baa5bf9a..8412eebad5 100644 --- a/libavformat/udp.c +++ b/libavformat/udp.c @@ -313,7 +313,7 @@ static int udp_set_url(struct sockaddr_storage *addr, int addr_len; res0 = udp_resolve_host(hostname, port, SOCK_DGRAM, AF_UNSPEC, 0); - if (res0 == 0) return AVERROR(EIO); + if (!res0) return AVERROR(EIO); memcpy(addr, res0->ai_addr, res0->ai_addrlen); addr_len = res0->ai_addrlen; freeaddrinfo(res0); @@ -332,7 +332,7 @@ static int udp_socket_create(UDPContext *s, struct sockaddr_storage *addr, family = ((struct sockaddr *) &s->dest_addr)->sa_family; res0 = udp_resolve_host(localaddr[0] ? localaddr : NULL, s->local_port, SOCK_DGRAM, family, AI_PASSIVE); - if (res0 == 0) + if (!res0) goto fail; for (res = res0; res; res=res->ai_next) { udp_fd = ff_socket(res->ai_family, SOCK_DGRAM, 0); |