summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorOneric <oneric@oneric.stub>2022-01-19 22:49:52 +0100
committerOneric <oneric@oneric.stub>2022-01-20 00:29:23 +0100
commitbfa1dbe8680f5b709828a4b317992a793cf26856 (patch)
tree1f4be312a03939d058ee13957b69ea15d56a6778 /test
parent06e48f1828bae0ffaa9021327bf040ab3fd69d46 (diff)
downloadlibass-bfa1dbe8680f5b709828a4b317992a793cf26856.tar.bz2
libass-bfa1dbe8680f5b709828a4b317992a793cf26856.tar.xz
refactor: do not cast allocations
Diffstat (limited to 'test')
-rw-r--r--test/test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test.c b/test/test.c
index c378e48..b099a9a 100644
--- a/test/test.c
+++ b/test/test.c
@@ -77,7 +77,7 @@ static void write_png(char *fname, image_t *img)
png_set_bgr(png_ptr);
- row_pointers = (png_byte **) malloc(img->height * sizeof(png_byte *));
+ row_pointers = malloc(img->height * sizeof(png_byte *));
for (k = 0; k < img->height; k++)
row_pointers[k] = img->buffer + img->stride * k;
@@ -118,7 +118,7 @@ static image_t *gen_image(int width, int height)
img->width = width;
img->height = height;
img->stride = width * 3;
- img->buffer = (unsigned char *) calloc(1, height * width * 3);
+ img->buffer = calloc(1, height * width * 3);
memset(img->buffer, 63, img->stride * img->height);
//for (int i = 0; i < height * width * 3; ++i)
// img->buffer[i] = (i/3/50) % 100;