Changeset 1fa6292 in mainline for uspace/lib/gfxfont/src/glyph_bmp.c


Ignore:
Timestamp:
2025-01-28T14:48:04Z (3 weeks ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master
Children:
56210a7
Parents:
97116a2
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2025-01-28 14:46:24)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2025-01-28 14:48:04)
Message:

Remove a ton of duplicated code in libui/libgfxfont tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/gfxfont/src/glyph_bmp.c

    r97116a2 r1fa6292  
    293293
    294294        /* Allocate new pixel array */
    295         npixels = calloc(sizeof(int), 1);
     295        npixels = calloc(1, sizeof(int));
    296296        if (npixels == NULL)
    297297                return ENOMEM;
     
    332332
    333333        /* Allocate new pixel array */
    334         npixels = calloc(sizeof(int), (nrect.p1.x - nrect.p0.x) *
    335             (nrect.p1.y - nrect.p0.y));
     334        npixels = calloc((nrect.p1.x - nrect.p0.x) *
     335            (nrect.p1.y - nrect.p0.y), sizeof(int));
    336336        if (npixels == NULL)
    337337                return ENOMEM;
Note: See TracChangeset for help on using the changeset viewer.