[FFmpeg-cvslog] lavc/gifdec: simplify "!= 0" checks
Paul B Mahol
git at videolan.org
Fri Jan 25 13:59:25 CET 2013
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Jan 25 12:13:17 2013 +0000| [aaebdce3d90725ff93a31678690a306da6e12bbb] | committer: Paul B Mahol
lavc/gifdec: simplify "!= 0" checks
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aaebdce3d90725ff93a31678690a306da6e12bbb
---
libavcodec/gifdec.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c
index b10a1a5..bd4c22d 100644
--- a/libavcodec/gifdec.c
+++ b/libavcodec/gifdec.c
@@ -338,7 +338,7 @@ static int gif_read_extension(GifState *s)
/* NOTE: many extension blocks can come after */
discard_ext:
- while (ext_len != 0) {
+ while (ext_len) {
/* There must be at least ext_len bytes and 1 for next block size byte. */
if (bytestream2_get_bytes_left(&s->gb) < ext_len + 1)
return AVERROR_INVALIDDATA;
@@ -362,8 +362,8 @@ static int gif_read_header1(GifState *s)
/* read gif signature */
bytestream2_get_bufferu(&s->gb, sig, 6);
- if (memcmp(sig, gif87a_sig, 6) != 0 &&
- memcmp(sig, gif89a_sig, 6) != 0)
+ if (memcmp(sig, gif87a_sig, 6) &&
+ memcmp(sig, gif89a_sig, 6))
return AVERROR_INVALIDDATA;
/* read screen header */
More information about the ffmpeg-cvslog
mailing list