summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexei Podtelezhnikov <apodtele@gmail.com>2021-04-26 17:07:44 -0400
committerAlexei Podtelezhnikov <apodtele@gmail.com>2021-04-26 17:07:44 -0400
commitdeee5b7017a8304da27f087ba29a8fd50f3ea446 (patch)
tree66ac086e0da3abd1d83f75e44926fd6c38a22433
parent270ff52f62ecf6b38744fa5f6b95808dd7dc49d9 (diff)
downloadfreetype2-deee5b7017a8304da27f087ba29a8fd50f3ea446.tar.gz
[psaux,psnames] Avoid some memory zeroing.
* src/psaux/psstack.c (cf2_stack_init): Tweak memory macro. * src/psnames/psmodule.c (ps_unicodes_init): Ditto.
-rw-r--r--ChangeLog7
-rw-r--r--src/psaux/psstack.c2
-rw-r--r--src/psnames/psmodule.c8
3 files changed, 12 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 0a834af08..e93e4c34e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2021-04-26 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [psaux,psnames] Avoid some memory zeroing.
+
+ * src/psaux/psstack.c (cf2_stack_init): Tweak memory macro.
+ * src/psnames/psmodule.c (ps_unicodes_init): Ditto.
+
2021-04-25 Alexei Podtelezhnikov <apodtele@gmail.com>
[base] Avoid some memory zeroing.
diff --git a/src/psaux/psstack.c b/src/psaux/psstack.c
index 7ae5256ef..72047e99b 100644
--- a/src/psaux/psstack.c
+++ b/src/psaux/psstack.c
@@ -67,7 +67,7 @@
stack->error = e;
/* allocate the stack buffer */
- if ( FT_NEW_ARRAY( stack->buffer, stackSize ) )
+ if ( FT_QNEW_ARRAY( stack->buffer, stackSize ) )
{
FT_FREE( stack );
return NULL;
diff --git a/src/psnames/psmodule.c b/src/psnames/psmodule.c
index 913ca98c4..c22ce5368 100644
--- a/src/psnames/psmodule.c
+++ b/src/psnames/psmodule.c
@@ -328,7 +328,7 @@
table->num_maps = 0;
table->maps = NULL;
- if ( !FT_NEW_ARRAY( table->maps, num_glyphs + EXTRA_GLYPH_LIST_SIZE ) )
+ if ( !FT_QNEW_ARRAY( table->maps, num_glyphs + EXTRA_GLYPH_LIST_SIZE ) )
{
FT_UInt n;
FT_UInt count;
@@ -391,9 +391,9 @@
/* Reallocate if the number of used entries is much smaller. */
if ( count < num_glyphs / 2 )
{
- (void)FT_RENEW_ARRAY( table->maps,
- num_glyphs + EXTRA_GLYPH_LIST_SIZE,
- count );
+ (void)FT_QRENEW_ARRAY( table->maps,
+ num_glyphs + EXTRA_GLYPH_LIST_SIZE,
+ count );
error = FT_Err_Ok;
}