summaryrefslogtreecommitdiff
path: root/core/fxcrt
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-10-09 19:04:04 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-09 19:04:04 +0000
commit1fc902fef97883f91a1ccf5bb3333ef11ed3b8fd (patch)
treeabe87980b363db2ac1efa0e0ff638f4b0b70b42f /core/fxcrt
parent7fb895f623e607a3c3b26b2caca0b15a0ef6947c (diff)
downloadpdfium-1fc902fef97883f91a1ccf5bb3333ef11ed3b8fd.tar.xz
Kill off some memset()s following FX_Alloc()
Change-Id: I92aa74c86aef890fcb991f039b9707d680fdb83c Reviewed-on: https://pdfium-review.googlesource.com/c/43652 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcrt')
-rw-r--r--core/fxcrt/fx_memory.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fxcrt/fx_memory.h b/core/fxcrt/fx_memory.h
index b39911269b..5596bceabe 100644
--- a/core/fxcrt/fx_memory.h
+++ b/core/fxcrt/fx_memory.h
@@ -88,7 +88,7 @@ inline void* FX_ReallocOrDie(void* ptr,
return result;
}
-// These never return nullptr.
+// These never return nullptr, and must return cleared memory.
#define FX_Alloc(type, size) \
static_cast<type*>(FX_AllocOrDie(size, sizeof(type)))
#define FX_Alloc2D(type, w, h) \
@@ -96,7 +96,7 @@ inline void* FX_ReallocOrDie(void* ptr,
#define FX_Realloc(type, ptr, size) \
static_cast<type*>(FX_ReallocOrDie(ptr, size, sizeof(type)))
-// May return nullptr.
+// May return nullptr, but returns cleared memory otherwise.
#define FX_TryAlloc(type, size) \
static_cast<type*>(FX_SafeAlloc(size, sizeof(type)))
#define FX_TryRealloc(type, ptr, size) \