diff options
author | Lei Zhang <thestig@chromium.org> | 2017-12-01 22:52:42 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-12-01 22:52:42 +0000 |
commit | b8d86800487df4021860f08407c323ed82243c79 (patch) | |
tree | ac91e7e9405cf47594316623b26a0aadd9544e79 /core/fxcodec/codec | |
parent | dca380ffe0571be4023b11b06b8aecad9934bb06 (diff) | |
download | pdfium-b8d86800487df4021860f08407c323ed82243c79.tar.xz |
Get rid of else after break/continue/return.chromium/3284chromium/3283
Change-Id: I3efc57cd7325d16e3ca8ebdeeaec06012b2c56e3
Reviewed-on: https://pdfium-review.googlesource.com/20110
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxcodec/codec')
-rw-r--r-- | core/fxcodec/codec/fx_codec_flate.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/fxcodec/codec/fx_codec_flate.cpp b/core/fxcodec/codec/fx_codec_flate.cpp index 5b1df38913..95902bb699 100644 --- a/core/fxcodec/codec/fx_codec_flate.cpp +++ b/core/fxcodec/codec/fx_codec_flate.cpp @@ -190,6 +190,8 @@ int CLZWDecoder::Decode(uint8_t* dest_buf, } } m_InPos += m_CodeLen; + if (code == 257) + break; if (code < 256) { if (m_OutPos == dest_size) { return -5; @@ -206,9 +208,8 @@ int CLZWDecoder::Decode(uint8_t* dest_buf, m_CodeLen = 9; m_nCodes = 0; old_code = 0xFFFFFFFF; - } else if (code == 257) { - break; } else { + // Else 257 or greater. if (old_code == 0xFFFFFFFF) return 2; |