From 551464706c848526646a20b5b4172cda69f0e005 Mon Sep 17 00:00:00 2001 From: Harry Jeffery Date: Sun, 10 Feb 2019 00:49:27 +0000 Subject: Tweak allocation sizeof operator usage --- src/bitmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bitmap.c') diff --git a/src/bitmap.c b/src/bitmap.c index ffae72c..38ca7a8 100644 --- a/src/bitmap.c +++ b/src/bitmap.c @@ -5,7 +5,7 @@ struct imv_bitmap *imv_bitmap_clone(struct imv_bitmap *bmp) { - struct imv_bitmap *copy = malloc(sizeof(struct imv_bitmap)); + struct imv_bitmap *copy = malloc(sizeof *copy); const size_t num_bytes = 4 * bmp->width * bmp->height; copy->width = bmp->width; copy->height = bmp->height; -- cgit v1.2.3