diff options
author | Paul B Mahol <onemda@gmail.com> | 2013-01-25 12:13:17 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2013-01-25 12:54:14 +0000 |
commit | aaebdce3d90725ff93a31678690a306da6e12bbb (patch) | |
tree | 778d16fbd4783aeb4f33e36ab9da159640fcee2b /libavcodec/gifdec.c | |
parent | f1412c799732e0a9bcba191f8eb23e3d14b7cece (diff) | |
download | ffmpeg-aaebdce3d90725ff93a31678690a306da6e12bbb.tar.gz |
lavc/gifdec: simplify "!= 0" checks
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/gifdec.c')
-rw-r--r-- | libavcodec/gifdec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c index b10a1a5474..bd4c22d1e5 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 */ |