diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-08-15 21:21:14 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-08-15 21:26:12 +0200 |
commit | 60dbed6067676d847157fe530b1caed06c77e2ab (patch) | |
tree | 62d43c9dc8162c8c809cc689f599befb2fdc2bbe /libavformat | |
parent | fb33bff990a8327f59d4c7c509bba1f62bbd6c5a (diff) | |
parent | 4b1f5e5090abed6c618c8ba380cd7d28d140f867 (diff) | |
download | ffmpeg-60dbed6067676d847157fe530b1caed06c77e2ab.tar.gz |
Merge commit '4b1f5e5090abed6c618c8ba380cd7d28d140f867'
* commit '4b1f5e5090abed6c618c8ba380cd7d28d140f867':
cosmetics: Write NULL pointer inequality checks more compactly
Conflicts:
libavcodec/dvdsubdec.c
libavcodec/h263dec.c
libavcodec/libxvid.c
libavcodec/rv10.c
libavcodec/utils.c
libavformat/format.c
libavformat/matroskadec.c
libavformat/segment.c
libavutil/opt.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/avio.c | 2 | ||||
-rw-r--r-- | libavformat/http.c | 2 | ||||
-rw-r--r-- | libavformat/matroskadec.c | 6 | ||||
-rw-r--r-- | libavformat/movenc.c | 2 | ||||
-rw-r--r-- | libavformat/rtmpproto.c | 2 | ||||
-rw-r--r-- | libavformat/tls.c | 2 | ||||
-rw-r--r-- | libavformat/url.c | 2 |
7 files changed, 9 insertions, 9 deletions
diff --git a/libavformat/avio.c b/libavformat/avio.c index 307b7036d9..326bb0aa78 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -98,7 +98,7 @@ int ffurl_register_protocol(URLProtocol *protocol) { URLProtocol **p; p = &first_protocol; - while (*p != NULL) + while (*p) p = &(*p)->next; *p = protocol; protocol->next = NULL; diff --git a/libavformat/http.c b/libavformat/http.c index 09b0d6ec07..7480834ec3 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -157,7 +157,7 @@ static int http_open_cnx_internal(URLContext *h, AVDictionary **options) proxy_path = getenv("http_proxy"); use_proxy = !ff_http_match_no_proxy(getenv("no_proxy"), hostname) && - proxy_path != NULL && av_strstart(proxy_path, "http://", NULL); + proxy_path && av_strstart(proxy_path, "http://", NULL); if (!strcmp(proto, "https")) { lower_proto = "tls"; diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 2dda729bab..dd1478cbf4 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1748,7 +1748,7 @@ static int matroska_parse_tracks(AVFormatContext *s) if (!strcmp(track->codec_id, "V_MS/VFW/FOURCC") && track->codec_priv.size >= 40 && - track->codec_priv.data != NULL) { + track->codec_priv.data) { track->ms_compat = 1; bit_depth = AV_RL16(track->codec_priv.data + 14); fourcc = AV_RL32(track->codec_priv.data + 16); @@ -1760,7 +1760,7 @@ static int matroska_parse_tracks(AVFormatContext *s) extradata_offset = 40; } else if (!strcmp(track->codec_id, "A_MS/ACM") && track->codec_priv.size >= 14 && - track->codec_priv.data != NULL) { + track->codec_priv.data) { int ret; ffio_init_context(&b, track->codec_priv.data, track->codec_priv.size, @@ -1781,7 +1781,7 @@ static int matroska_parse_tracks(AVFormatContext *s) } } else if (!strcmp(track->codec_id, "V_QUICKTIME") && (track->codec_priv.size >= 21) && - (track->codec_priv.data != NULL)) { + (track->codec_priv.data)) { fourcc = AV_RL32(track->codec_priv.data + 4); codec_id = ff_codec_get_id(ff_codec_movvideo_tags, fourcc); if (ff_codec_get_id(ff_codec_movvideo_tags, AV_RL32(track->codec_priv.data))) { diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 5d7682c293..2b801b7522 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -4008,7 +4008,7 @@ static int mov_write_header(AVFormatContext *s) /* Default mode == MP4 */ mov->mode = MODE_MP4; - if (s->oformat != NULL) { + if (s->oformat) { if (!strcmp("3gp", s->oformat->name)) mov->mode = MODE_3GP; else if (!strcmp("3g2", s->oformat->name)) mov->mode = MODE_3GP|MODE_3G2; else if (!strcmp("mov", s->oformat->name)) mov->mode = MODE_MOV; diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index 3814da8c54..3cde966b1f 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -372,7 +372,7 @@ static int gen_connect(URLContext *s, RTMPContext *rt) char *param = rt->conn; // Write arbitrary AMF data to the Connect message. - while (param != NULL) { + while (param) { char *sep; param += strspn(param, " "); if (!*param) diff --git a/libavformat/tls.c b/libavformat/tls.c index 7fd18cfce0..61fb2bff85 100644 --- a/libavformat/tls.c +++ b/libavformat/tls.c @@ -193,7 +193,7 @@ static int tls_open(URLContext *h, const char *uri, int flags) proxy_path = getenv("http_proxy"); use_proxy = !ff_http_match_no_proxy(getenv("no_proxy"), host) && - proxy_path != NULL && av_strstart(proxy_path, "http://", NULL); + proxy_path && av_strstart(proxy_path, "http://", NULL); if (use_proxy) { char proxy_host[200], proxy_auth[200], dest[200]; diff --git a/libavformat/url.c b/libavformat/url.c index 47e15843cf..acfb0cf2f0 100644 --- a/libavformat/url.c +++ b/libavformat/url.c @@ -111,7 +111,7 @@ void ff_make_absolute_url(char *buf, int size, const char *base, /* Strip off any query string from base */ path_query = strchr(buf, '?'); - if (path_query != NULL) + if (path_query) *path_query = '\0'; /* Is relative path just a new query part? */ |