summaryrefslogtreecommitdiff
path: root/xfa/src/fxbarcode/qrcode/BC_QRCoderMode.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2016-02-24 15:26:50 -0800
committerLei Zhang <thestig@chromium.org>2016-02-24 15:26:50 -0800
commit38eaaf36b09b816b963015e33dc4eb02580e0462 (patch)
tree9a2721eb404a2de4ddce91b50cac25b2cac0edb1 /xfa/src/fxbarcode/qrcode/BC_QRCoderMode.cpp
parente1fb98394a6885cf03bdc6391e5a3878aad5b375 (diff)
downloadpdfium-38eaaf36b09b816b963015e33dc4eb02580e0462.tar.xz
Remove foo != NULL checks in xfa/src/fxbarcode.
R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1726373002 .
Diffstat (limited to 'xfa/src/fxbarcode/qrcode/BC_QRCoderMode.cpp')
-rw-r--r--xfa/src/fxbarcode/qrcode/BC_QRCoderMode.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderMode.cpp b/xfa/src/fxbarcode/qrcode/BC_QRCoderMode.cpp
index 7ec3df2b08..337d21a9e9 100644
--- a/xfa/src/fxbarcode/qrcode/BC_QRCoderMode.cpp
+++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderMode.cpp
@@ -42,7 +42,7 @@ CBC_QRCoderMode::CBC_QRCoderMode(int32_t* characterCountBitsForVersions,
int32_t bits,
CFX_ByteString name) {
m_characterCountBitsForVersions = characterCountBitsForVersions;
- if (m_characterCountBitsForVersions != NULL) {
+ if (m_characterCountBitsForVersions) {
m_characterCountBitsForVersions[0] = x1;
m_characterCountBitsForVersions[1] = x2;
m_characterCountBitsForVersions[2] = x3;
@@ -51,9 +51,7 @@ CBC_QRCoderMode::CBC_QRCoderMode(int32_t* characterCountBitsForVersions,
m_bits = bits;
}
CBC_QRCoderMode::~CBC_QRCoderMode() {
- if (m_characterCountBitsForVersions != NULL) {
- FX_Free(m_characterCountBitsForVersions);
- }
+ FX_Free(m_characterCountBitsForVersions);
}
void CBC_QRCoderMode::Initialize() {
sBYTE = new CBC_QRCoderMode(FX_Alloc(int32_t, 3), 8, 16, 16, 0x4, "BYTE");