diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-07-27 14:38:43 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-07-27 14:38:43 -0700 |
commit | a25b4bca69ab26d174edb8cefbdcfc1a0353915a (patch) | |
tree | 3de2d8bc8f09023c6a0747ed0fd89323c6158e35 /core/src/fpdfapi/fpdf_edit | |
parent | fa69033db8803b191fa43f3c5bec65998d2dc2f9 (diff) | |
download | pdfium-a25b4bca69ab26d174edb8cefbdcfc1a0353915a.tar.xz |
Fix FX_BOOL compilation errors under windows
- Bool functions should not return -1 for error.
- Bool variables should not be assigned 2
- Bool / int32_t prototypes should match.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1254973004 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_edit')
-rw-r--r-- | core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp index 22826a3609..7b7b61aa02 100644 --- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp +++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp @@ -751,14 +751,14 @@ FX_BOOL CPDF_XRefStream::GenerateXRefStream(CPDF_Creator* pCreator, FX_BOOL bEOF offset += len + 7; if (m_PrevOffset > 0) { if (pFile->AppendString(FX_BSTRC("/Prev ")) < 0) { - return -1; + return FALSE; } FX_CHAR offset_buf[20]; FXSYS_memset(offset_buf, 0, sizeof(offset_buf)); FXSYS_i64toa(m_PrevOffset, offset_buf, 10); int32_t len = (int32_t)FXSYS_strlen(offset_buf); if (pFile->AppendBlock(offset_buf, len) < 0) { - return -1; + return FALSE; } offset += len + 6; } @@ -786,7 +786,7 @@ FX_BOOL CPDF_XRefStream::GenerateXRefStream(CPDF_Creator* pCreator, FX_BOOL bEOF offset += len + 8; if (bEOF) { if ((len = PDF_CreatorWriteTrailer(pCreator->m_pDocument, pFile, pCreator->m_pIDArray, pCreator->m_bCompress)) < 0) { - return -1; + return FALSE; } offset += len; if (pCreator->m_pEncryptDict) { @@ -795,7 +795,7 @@ FX_BOOL CPDF_XRefStream::GenerateXRefStream(CPDF_Creator* pCreator, FX_BOOL bEOF dwEncryptObjNum = pCreator->m_dwEnryptObjNum; } if ((len = PDF_CreatorWriteEncrypt(pCreator->m_pEncryptDict, dwEncryptObjNum, pFile)) < 0) { - return -1; + return FALSE; } offset += len; } |