diff options
author | Oneric <oneric@oneric.stub> | 2022-01-19 22:49:52 +0100 |
---|---|---|
committer | Oneric <oneric@oneric.stub> | 2022-01-20 00:29:23 +0100 |
commit | bfa1dbe8680f5b709828a4b317992a793cf26856 (patch) | |
tree | 1f4be312a03939d058ee13957b69ea15d56a6778 /libass/ass_directwrite.c | |
parent | 06e48f1828bae0ffaa9021327bf040ab3fd69d46 (diff) | |
download | libass-bfa1dbe8680f5b709828a4b317992a793cf26856.tar.bz2 libass-bfa1dbe8680f5b709828a4b317992a793cf26856.tar.xz |
refactor: do not cast allocations
Diffstat (limited to 'libass/ass_directwrite.c')
-rw-r--r-- | libass/ass_directwrite.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libass/ass_directwrite.c b/libass/ass_directwrite.c index ccb82c3..f8c2a27 100644 --- a/libass/ass_directwrite.c +++ b/libass/ass_directwrite.c @@ -482,7 +482,7 @@ static char *get_utf8_name(IDWriteLocalizedStrings *names, int k) if (length >= (UINT32) -1 || length + (size_t) 1 > SIZE_MAX / sizeof(wchar_t)) goto cleanup; - temp_name = (wchar_t *) malloc((length + 1) * sizeof(wchar_t)); + temp_name = malloc((length + 1) * sizeof(wchar_t)); if (!temp_name) goto cleanup; @@ -495,7 +495,7 @@ static char *get_utf8_name(IDWriteLocalizedStrings *names, int k) if (!size_needed) goto cleanup; - mbName = (char *) malloc(size_needed); + mbName = malloc(size_needed); if (!mbName) goto cleanup; @@ -616,7 +616,7 @@ static void add_font_face(IDWriteFontFace *face, ASS_FontProvider *provider, goto cleanup; } - FontPrivate *font_priv = (FontPrivate *) calloc(1, sizeof(*font_priv)); + FontPrivate *font_priv = calloc(1, sizeof(*font_priv)); if (!font_priv) goto cleanup; @@ -815,7 +815,7 @@ static void add_font(IDWriteFont *font, IDWriteFontFamily *fontFamily, if (!get_font_info_IDWriteFont(font, fontFamily, &meta)) goto cleanup; - FontPrivate *font_priv = (FontPrivate *) calloc(1, sizeof(*font_priv)); + FontPrivate *font_priv = calloc(1, sizeof(*font_priv)); if (!font_priv) goto cleanup; font_priv->font = font; @@ -1086,7 +1086,7 @@ ASS_FontProvider *ass_directwrite_add_provider(ASS_Library *lib, goto cleanup; } - priv = (ProviderPrivate *)calloc(sizeof(*priv), 1); + priv = calloc(sizeof(*priv), 1); if (!priv) goto cleanup; |