[psaux,psnames] Avoid some memory zeroing.
* src/psaux/psstack.c (cf2_stack_init): Tweak memory macro. * src/psnames/psmodule.c (ps_unicodes_init): Ditto.
This commit is contained in:
parent
270ff52f62
commit
deee5b7017
@ -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.
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user