freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype][master] * src/cff/cffdrivr.c (cff_ps_get_font_{


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype][master] * src/cff/cffdrivr.c (cff_ps_get_font_{info,extra}): Use FT_QNEW.
Date: Mon, 20 Sep 2021 18:33:48 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType

Commits:

1 changed file:

Changes:

  • src/cff/cffdrivr.c
    ... ... @@ -473,12 +473,12 @@
    473 473
     
    
    474 474
         if ( cff && !cff->font_info )
    
    475 475
         {
    
    476
    -      CFF_FontRecDict  dict      = &cff->top_font.font_dict;
    
    477
    -      PS_FontInfoRec  *font_info = NULL;
    
    478
    -      FT_Memory        memory    = face->root.memory;
    
    476
    +      CFF_FontRecDict  dict   = &cff->top_font.font_dict;
    
    477
    +      FT_Memory        memory = face->root.memory;
    
    478
    +      PS_FontInfoRec*  font_info;
    
    479 479
     
    
    480 480
     
    
    481
    -      if ( FT_QALLOC( font_info, sizeof ( *font_info ) ) )
    
    481
    +      if ( FT_QNEW( font_info ) )
    
    482 482
             goto Fail;
    
    483 483
     
    
    484 484
           font_info->version     = cff_index_get_sid_string( cff,
    
    ... ... @@ -515,15 +515,15 @@
    515 515
         FT_Error  error = FT_Err_Ok;
    
    516 516
     
    
    517 517
     
    
    518
    -    if ( cff && cff->font_extra == NULL )
    
    518
    +    if ( cff && !cff->font_extra )
    
    519 519
         {
    
    520
    -      CFF_FontRecDict   dict       = &cff->top_font.font_dict;
    
    521
    -      PS_FontExtraRec*  font_extra = NULL;
    
    522
    -      FT_Memory         memory     = face->root.memory;
    
    520
    +      CFF_FontRecDict   dict   = &cff->top_font.font_dict;
    
    521
    +      FT_Memory         memory = face->root.memory;
    
    522
    +      PS_FontExtraRec*  font_extra;
    
    523 523
           FT_String*        embedded_postscript;
    
    524 524
     
    
    525 525
     
    
    526
    -      if ( FT_ALLOC( font_extra, sizeof ( *font_extra ) ) )
    
    526
    +      if ( FT_QNEW( font_extra ) )
    
    527 527
             goto Fail;
    
    528 528
     
    
    529 529
           font_extra->fs_type = 0U;
    


  • reply via email to

    [Prev in Thread] Current Thread [Next in Thread]