From 71ba5883dd00145b2256935635492cbcc8d94bac Mon Sep 17 00:00:00 2001 From: tsepez Date: Fri, 28 Oct 2016 09:35:49 -0700 Subject: Fix more FX_BOOL / int noise in core/fpdfsdk Review-Url: https://codereview.chromium.org/2454263002 --- core/fxcodec/codec/ccodec_jpegmodule.h | 2 +- core/fxcodec/codec/fx_codec_jpeg.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'core/fxcodec') diff --git a/core/fxcodec/codec/ccodec_jpegmodule.h b/core/fxcodec/codec/ccodec_jpegmodule.h index 74071347cb..225fd98467 100644 --- a/core/fxcodec/codec/ccodec_jpegmodule.h +++ b/core/fxcodec/codec/ccodec_jpegmodule.h @@ -53,7 +53,7 @@ class CCodec_JpegModule { CFX_DIBAttribute* pAttribute); #endif // PDF_ENABLE_XFA - int StartScanline(FXJPEG_Context* pContext, int down_scale); + FX_BOOL StartScanline(FXJPEG_Context* pContext, int down_scale); FX_BOOL ReadScanline(FXJPEG_Context* pContext, uint8_t* dest_buf); uint32_t GetAvailInput(FXJPEG_Context* pContext, uint8_t** avail_buf_ptr); }; diff --git a/core/fxcodec/codec/fx_codec_jpeg.cpp b/core/fxcodec/codec/fx_codec_jpeg.cpp index 7670516a25..49b0aca3b8 100644 --- a/core/fxcodec/codec/fx_codec_jpeg.cpp +++ b/core/fxcodec/codec/fx_codec_jpeg.cpp @@ -449,12 +449,12 @@ int CCodec_JpegModule::ReadHeader(FXJPEG_Context* ctx, return 0; } -int CCodec_JpegModule::StartScanline(FXJPEG_Context* ctx, int down_scale) { +FX_BOOL CCodec_JpegModule::StartScanline(FXJPEG_Context* ctx, int down_scale) { if (setjmp(ctx->m_JumpMark) == -1) - return 0; + return FALSE; ctx->m_Info.scale_denom = down_scale; - return jpeg_start_decompress(&ctx->m_Info); + return !!jpeg_start_decompress(&ctx->m_Info); } FX_BOOL CCodec_JpegModule::ReadScanline(FXJPEG_Context* ctx, -- cgit v1.2.3