summaryrefslogtreecommitdiff
path: root/core/src/fpdftext/fpdf_text_int.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-12-14 18:29:28 -0800
committerLei Zhang <thestig@chromium.org>2015-12-14 18:29:28 -0800
commite385244f8cd6ae376f6b3cf1265a0795d5d30eff (patch)
tree4bdd7c459f167ee56ae35f3b87222c2557f501f8 /core/src/fpdftext/fpdf_text_int.cpp
parente3c7c2b54348da4a6939f6672f6c6bff126815a7 (diff)
downloadpdfium-e385244f8cd6ae376f6b3cf1265a0795d5d30eff.tar.xz
Get rid of most instance of 'foo == NULL'
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1520063002 .
Diffstat (limited to 'core/src/fpdftext/fpdf_text_int.cpp')
-rw-r--r--core/src/fpdftext/fpdf_text_int.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/src/fpdftext/fpdf_text_int.cpp b/core/src/fpdftext/fpdf_text_int.cpp
index 8a359fe9af..1e6d54d133 100644
--- a/core/src/fpdftext/fpdf_text_int.cpp
+++ b/core/src/fpdftext/fpdf_text_int.cpp
@@ -2464,12 +2464,12 @@ FX_BOOL CPDF_TextPageFind::ExtractSubString(CFX_WideString& rString,
const FX_WCHAR* lpszFullString,
int iSubString,
FX_WCHAR chSep) {
- if (lpszFullString == NULL) {
+ if (!lpszFullString) {
return FALSE;
}
while (iSubString--) {
lpszFullString = FXSYS_wcschr(lpszFullString, chSep);
- if (lpszFullString == NULL) {
+ if (!lpszFullString) {
rString.Empty();
return FALSE;
}
@@ -2479,8 +2479,8 @@ FX_BOOL CPDF_TextPageFind::ExtractSubString(CFX_WideString& rString,
}
}
const FX_WCHAR* lpchEnd = FXSYS_wcschr(lpszFullString, chSep);
- int nLen = (lpchEnd == NULL) ? (int)FXSYS_wcslen(lpszFullString)
- : (int)(lpchEnd - lpszFullString);
+ int nLen = lpchEnd ? (int)(lpchEnd - lpszFullString)
+ : (int)FXSYS_wcslen(lpszFullString);
ASSERT(nLen >= 0);
FXSYS_memcpy(rString.GetBuffer(nLen), lpszFullString,
nLen * sizeof(FX_WCHAR));