Merge changes I66a64a0a,I4d2e520f

* changes:
  cosmetics,webpinfo: remove an else after a return
  cosmetics,cwebp: remove an else after a return
This commit is contained in:
Pascal Massimino 2017-08-27 06:03:09 +00:00 committed by Gerrit Code Review
commit 5bd40066cc
2 changed files with 6 additions and 7 deletions

View File

@ -486,10 +486,10 @@ static int WriteWebPWithMetadata(FILE* const out,
*metadata_written |= METADATA_XMP;
}
return ok;
} else {
// No metadata, just write the original image file.
return (fwrite(webp, webp_size, 1, out) == 1);
}
// No metadata, just write the original image file.
return (fwrite(webp, webp_size, 1, out) == 1);
}
//------------------------------------------------------------------------------

View File

@ -817,9 +817,8 @@ static WebPInfoStatus ProcessImageChunk(const ChunkData* const chunk_data,
if (webp_info->seen_image_subchunk_) {
LOG_ERROR("Consecutive VP8/VP8L sub-chunks in an ANMF chunk.");
return WEBP_INFO_PARSE_ERROR;
} else {
webp_info->seen_image_subchunk_ = 1;
}
webp_info->seen_image_subchunk_ = 1;
} else {
if (webp_info->chunk_counts_[CHUNK_VP8] ||
webp_info->chunk_counts_[CHUNK_VP8L]) {
@ -873,9 +872,9 @@ static WebPInfoStatus ProcessALPHChunk(const ChunkData* const chunk_data,
if (webp_info->seen_alpha_subchunk_) {
LOG_ERROR("Consecutive ALPH sub-chunks in an ANMF chunk.");
return WEBP_INFO_PARSE_ERROR;
} else {
webp_info->seen_alpha_subchunk_ = 1;
}
webp_info->seen_alpha_subchunk_ = 1;
if (webp_info->seen_image_subchunk_) {
LOG_ERROR("ALPHA sub-chunk detected after VP8 sub-chunk "
"in an ANMF chunk.");