From f0db1af7a59c236c97777fbe42d00ecff0329068 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ki=C3=ABd=20Llaentenn?= Date: Thu, 17 Sep 2020 12:06:16 +0000 Subject: [PATCH] draw.c: use calloc instead of malloc --- draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draw.c b/draw.c index 0a5dc76..2c94cbf 100644 --- a/draw.c +++ b/draw.c @@ -26,7 +26,7 @@ init(struct buffer *buf) buf->height = tb_height(); size_t len = buf->width * buf->height; - buf->buf = (uint8_t*) malloc(len); + buf->buf = (uint8_t*) calloc(len, sizeof(uint8_t)); len -= buf->width; if (buf->buf == NULL) {