From 5adc07df8f00c0f1fbf7330eef3de44936d44d97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ki=C3=ABd=20Llaentenn?= Date: Thu, 17 Sep 2020 12:07:24 +0000 Subject: [PATCH] draw.c: remove redundant memset --- draw.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/draw.c b/draw.c index 2c94cbf..35f3b5b 100644 --- a/draw.c +++ b/draw.c @@ -30,14 +30,12 @@ init(struct buffer *buf) len -= buf->width; if (buf->buf == NULL) { - PRINT("fire: cannot "); + EPRINT("fire: cannot "); perror("calloc()"); exit(1); } - // initialize the entire screen to black... - memset(buf->buf, 0, len); - + // calloc sets the entire screen to black // ...except for the last row, which is white. // this is the 'base' of the fire. memset(buf->buf + len, 12, buf->width);