diff options
Diffstat (limited to 'src/xftrender.c')
-rw-r--r-- | src/xftrender.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/xftrender.c b/src/xftrender.c index dee7943..37bb499 100644 --- a/src/xftrender.c +++ b/src/xftrender.c @@ -269,7 +269,7 @@ XftGlyphSpecRender (Display *dpy, elts = elts_local; if (nelt > NUM_ELT_LOCAL) { - elts = malloc ((size_t)nelt * sizeof (XGlyphElt8)); + elts = AllocGlyphElt8Array (nelt); if (!elts) goto bail2; } @@ -369,7 +369,7 @@ XftCharSpecRender (Display *dpy, glyphs = glyphs_local; else { - glyphs = malloc ((size_t)len * sizeof (XftGlyphSpec)); + glyphs = AllocGlyphSpecArray (len); if (!glyphs) return; } @@ -557,7 +557,7 @@ XftGlyphFontSpecRender (Display *dpy, elts = elts_local; if (nelt > NUM_ELT_LOCAL) { - elts = malloc ((size_t)nelt * sizeof (XGlyphElt8)); + elts = AllocGlyphElt8Array (nelt); if (!elts) goto bail2; } @@ -662,7 +662,7 @@ XftCharFontSpecRender (Display *dpy, glyphs = glyphs_local; else { - glyphs = malloc ((size_t)len * sizeof (XftGlyphFontSpec)); + glyphs = AllocGlyphFontSpecArray (len); if (!glyphs) return; } @@ -702,7 +702,7 @@ XftTextRender8 (Display *dpy, glyphs = glyphs_local; else { - glyphs = malloc ((size_t)len * sizeof (FT_UInt)); + glyphs = AllocUIntArray (len); if (!glyphs) return; } @@ -737,7 +737,7 @@ XftTextRender16 (Display *dpy, glyphs = glyphs_local; else { - glyphs = malloc ((size_t)len * sizeof (FT_UInt)); + glyphs = AllocUIntArray (len); if (!glyphs) return; } @@ -772,7 +772,7 @@ XftTextRender16BE (Display *dpy, glyphs = glyphs_local; else { - glyphs = malloc ((size_t)len * sizeof (FT_UInt)); + glyphs = AllocUIntArray (len); if (!glyphs) return; } @@ -808,7 +808,7 @@ XftTextRender16LE (Display *dpy, glyphs = glyphs_local; else { - glyphs = malloc ((size_t)len * sizeof (FT_UInt)); + glyphs = AllocUIntArray (len); if (!glyphs) return; } @@ -844,7 +844,7 @@ XftTextRender32 (Display *dpy, glyphs = glyphs_local; else { - glyphs = malloc ((size_t)len * sizeof (FT_UInt)); + glyphs = AllocUIntArray (len); if (!glyphs) return; } @@ -879,7 +879,7 @@ XftTextRender32BE (Display *dpy, glyphs = glyphs_local; else { - glyphs = malloc ((size_t)len * sizeof (FT_UInt)); + glyphs = AllocUIntArray (len); if (!glyphs) return; } @@ -918,7 +918,7 @@ XftTextRender32LE (Display *dpy, glyphs = glyphs_local; else { - glyphs = malloc ((size_t)len * sizeof (FT_UInt)); + glyphs = AllocUIntArray (len); if (!glyphs) return; } @@ -963,7 +963,7 @@ XftTextRenderUtf8 (Display *dpy, { if (i == size) { - glyphs_new = malloc ((size_t)size * 2 * sizeof (FT_UInt)); + glyphs_new = AllocUIntArray (size * 2); if (!glyphs_new) { if (glyphs != glyphs_local) @@ -1016,7 +1016,7 @@ XftTextRenderUtf16 (Display *dpy, { if (i == size) { - glyphs_new = malloc ((size_t)size * 2 * sizeof (FT_UInt)); + glyphs_new = AllocUIntArray (size * 2); if (!glyphs_new) { if (glyphs != glyphs_local) |