summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/fxcodec/codec/fx_codec_jpx_unittest.cpp2
-rw-r--r--core/fxcrt/fx_basic_bstring_unittest.cpp2
-rw-r--r--core/fxcrt/include/fx_memory.h6
3 files changed, 5 insertions, 5 deletions
diff --git a/core/fxcodec/codec/fx_codec_jpx_unittest.cpp b/core/fxcodec/codec/fx_codec_jpx_unittest.cpp
index 13b5425927..820a618f5b 100644
--- a/core/fxcodec/codec/fx_codec_jpx_unittest.cpp
+++ b/core/fxcodec/codec/fx_codec_jpx_unittest.cpp
@@ -23,7 +23,7 @@ TEST(fxcodec, DecodeDataNullDecodeData) {
unsigned char buffer[16];
DecodeData* ptr = nullptr;
- // Error codes, not segvs, should callers pass us a NULL pointer.
+ // Error codes, not segvs, should callers pass us a nullptr pointer.
EXPECT_EQ(kReadError, opj_read_from_memory(buffer, sizeof(buffer), ptr));
EXPECT_EQ(kWriteError, opj_write_from_memory(buffer, sizeof(buffer), ptr));
EXPECT_EQ(kSkipError, opj_skip_from_memory(1, ptr));
diff --git a/core/fxcrt/fx_basic_bstring_unittest.cpp b/core/fxcrt/fx_basic_bstring_unittest.cpp
index 220105aa95..cfdf2794b4 100644
--- a/core/fxcrt/fx_basic_bstring_unittest.cpp
+++ b/core/fxcrt/fx_basic_bstring_unittest.cpp
@@ -758,7 +758,7 @@ TEST(fxcrt, ByteStringCFromChar) {
CFX_ByteStringC nul_string_from_char(nul);
CFX_ByteStringC lower_a_string_from_char(lower_a);
- // Pointer to nul, not NULL ptr, hence length 1 ...
+ // Pointer to nul, not nullptr ptr, hence length 1 ...
EXPECT_EQ(1, nul_string_from_char.GetLength());
EXPECT_NE(null_string, nul_string_from_char);
diff --git a/core/fxcrt/include/fx_memory.h b/core/fxcrt/include/fx_memory.h
index 3048897d76..fa8da6067c 100644
--- a/core/fxcrt/include/fx_memory.h
+++ b/core/fxcrt/include/fx_memory.h
@@ -13,7 +13,7 @@
extern "C" {
#endif
-// For external C libraries to malloc through PDFium. These may return NULL.
+// For external C libraries to malloc through PDFium. These may return nullptr.
void* FXMEM_DefaultAlloc(size_t byte_size, int flags);
void* FXMEM_DefaultRealloc(void* pointer, size_t new_size, int flags);
void FXMEM_DefaultFree(void* pointer, int flags);
@@ -61,13 +61,13 @@ inline void* FX_ReallocOrDie(void* ptr,
return nullptr; // Suppress compiler warning.
}
-// Never returns NULL.
+// Never returns nullptr.
#define FX_Alloc(type, size) (type*) FX_AllocOrDie(size, sizeof(type))
#define FX_Alloc2D(type, w, h) (type*) FX_AllocOrDie2D(w, h, sizeof(type))
#define FX_Realloc(type, ptr, size) \
(type*) FX_ReallocOrDie(ptr, size, sizeof(type))
-// May return NULL.
+// May return nullptr.
#define FX_TryAlloc(type, size) (type*) calloc(size, sizeof(type))
#define FX_TryRealloc(type, ptr, size) \
(type*) FX_SafeRealloc(ptr, size, sizeof(type))