Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Unified Diff: core/src/fxcrt/fx_basic_gcc.cpp

Issue 1520063002: Get rid of most instance of 'foo == NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium@bstr_isnull
Patch Set: rebase Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fxcrt/fx_basic_bstring.cpp ('k') | core/src/fxcrt/fx_basic_list.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxcrt/fx_basic_gcc.cpp
diff --git a/core/src/fxcrt/fx_basic_gcc.cpp b/core/src/fxcrt/fx_basic_gcc.cpp
index c352ee3f81a3b1ff87ed298aa5d52e060481e232..50499a8dc451f51de90d87f50040bcca7b58c55b 100644
--- a/core/src/fxcrt/fx_basic_gcc.cpp
+++ b/core/src/fxcrt/fx_basic_gcc.cpp
@@ -120,7 +120,7 @@ FX_DWORD FXSYS_GetFullPathName(const FX_CHAR* filename,
FX_CHAR* buf,
FX_CHAR** filepart) {
int srclen = FXSYS_strlen(filename);
- if (buf == NULL || (int)buflen < srclen + 1) {
+ if (!buf || (int)buflen < srclen + 1) {
return srclen + 1;
}
FXSYS_strcpy(buf, filename);
@@ -142,7 +142,7 @@ FXSYS_FILE* FXSYS_wfopen(const FX_WCHAR* filename, const FX_WCHAR* mode) {
CFX_ByteString::FromUnicode(mode));
}
char* FXSYS_strlwr(char* str) {
- if (str == NULL) {
+ if (!str) {
return NULL;
}
char* s = str;
@@ -153,7 +153,7 @@ char* FXSYS_strlwr(char* str) {
return s;
}
char* FXSYS_strupr(char* str) {
- if (str == NULL) {
+ if (!str) {
return NULL;
}
char* s = str;
@@ -164,7 +164,7 @@ char* FXSYS_strupr(char* str) {
return s;
}
FX_WCHAR* FXSYS_wcslwr(FX_WCHAR* str) {
- if (str == NULL) {
+ if (!str) {
return NULL;
}
FX_WCHAR* s = str;
@@ -175,7 +175,7 @@ FX_WCHAR* FXSYS_wcslwr(FX_WCHAR* str) {
return s;
}
FX_WCHAR* FXSYS_wcsupr(FX_WCHAR* str) {
- if (str == NULL) {
+ if (!str) {
return NULL;
}
FX_WCHAR* s = str;
« no previous file with comments | « core/src/fxcrt/fx_basic_bstring.cpp ('k') | core/src/fxcrt/fx_basic_list.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698